Coder Social home page Coder Social logo

Comments (5)

sebmarkbage avatar sebmarkbage commented on May 3, 2024

Related and possible solution: facebook/react#944

from react-future.

sebmarkbage avatar sebmarkbage commented on May 3, 2024

Another possible solution would be to allow a spread operator in objects and JSX. As described in #6

var x = <div {...this.props} className="foo" />;

Desugars to:

var x = React.DOM.div({...this.props, className: 'foo' });

Which desugars to:

var x = React.DOM.div(Object.append({}, this.props, { className: 'foo' }));

from react-future.

jeffmo avatar jeffmo commented on May 3, 2024

Another possible (general) solution:

Start using react: namespaced attributes for react-specific props. This keeps us in the realm of XML, solves the "having framework-imposed attributes collides with app props" problem once and for all (just use the react: namespace), and doesn't require yet-to-be-proposed new-language-feature familiarity to understand the meaning at first glance.

from react-future.

sebmarkbage avatar sebmarkbage commented on May 3, 2024

This is already done and released in 0.12. Yay!

from react-future.

evenstensberg avatar evenstensberg commented on May 3, 2024

So cool looking back at old PR's/issues and see this implemented 😄

from react-future.

Related Issues (20)

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.