Giter Site home page Giter Site logo

Comments (3)

mikechau avatar mikechau commented on July 29, 2024

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.

eddyystop avatar eddyystop commented on July 29, 2024

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.

xmo-odoo avatar xmo-odoo commented on July 29, 2024

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 deprecate React.createClass.

See also facebook/react#1380

from react-primer-draft.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.