Update 2016-07-13-mixins-considered-harmful.md (#3096)

typo
This commit is contained in:
RedasP
2020-07-10 17:00:19 +03:00
committed by GitHub
parent a09854032a
commit dea363ed7d

View File

@@ -607,7 +607,7 @@ var Button = React.createClass({
Sometimes people use mixins to selectively add logging to lifecycle methods in some components. In the future, we intend to provide an [official DevTools API](https://github.com/facebook/react/issues/5306) that would let you implement something similar without touching the components. However its still very much a work in progress. If you heavily depend on logging mixins for debugging, you might want to keep using those mixins for a little longer.
If you cant accomplish something with a component, a higher-order component, or a utility module, it could be mean that React should provide this out of the box. [File an issue](https://github.com/facebook/react/issues/new) to tell us about your use case for mixins, and well help you consider alternatives or perhaps implement your feature request.
If you cant accomplish something with a component, a higher-order component, or a utility module, it could mean that React should provide this out of the box. [File an issue](https://github.com/facebook/react/issues/new) to tell us about your use case for mixins, and well help you consider alternatives or perhaps implement your feature request.
Mixins are not deprecated in the traditional sense. You can keep using them with `React.createClass()`, as we wont be changing it further. Eventually, as ES6 classes gain more adoption and their usability problems in React are solved, we might split `React.createClass()` into a separate package because most people wouldnt need it. Even in that case, your old mixins would keep working.