Comments (3)
Thanks!
I plan to be adding the ES6 version as well. Probably after I finish Part 2. My application is still on 0.12.x
, but I plan to update the document to have all new things from 0.13
.
I will make a note that this guide is initially written for 0.12.x
, but will definitely be updated for 0.13
.
But if anyone wants to add ES6 examples feel free!
from react-primer-draft.
Using ES6 classes means you cannot currently use mixins and mixins are very useful. It should be possible to cobble together a way to use existing mixins in ES6 classes
from react-primer-draft.
It should be possible to cobble together a way to use existing mixins in ES6 classes
Unless React moves away from the existing mixins system entirely and towards higher-order components and class decorators instead which seems to be the case.
The React 0.13 release notes certainly seemed to say that mixins were a stopgap and that they'd be dropped (alongside React.createClass
) when an equivalent solution is found using native structures, not that effort would be expended towards adding mixins to ES6 components:
Our eventual goal is for ES6 classes to replace
React.createClass
completely, but until we have a replacement for current mixin use cases and support for class property initializers in the language, we don't plan to deprecateReact.createClass
.
See also facebook/react#1380
from react-primer-draft.
Related Issues (8)
- Example "3rd Party Libararies" does not work HOT 3
- Update the examples to not use document.body HOT 1
- Add ES6 class component examples
- Publish it using GitBook.com HOT 6
- JS Bins are missing <div id="container"></div> HOT 5
- React doc links need updating HOT 1
- Clarify anti-pattern in getDefaultProps HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-primer-draft.