Browse Source

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

typo
main
RedasP 5 years ago
committed by GitHub
parent
commit
dea363ed7d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/blog/2016-07-13-mixins-considered-harmful.md

2
content/blog/2016-07-13-mixins-considered-harmful.md

@ -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 it’s 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 can’t 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 we’ll help you consider alternatives or perhaps implement your feature request.
If you can’t 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 we’ll 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 won’t 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 wouldn’t need it. Even in that case, your old mixins would keep working.

Loading…
Cancel
Save