Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove wp.element; embrace React #876

Closed
nylen opened this issue May 23, 2017 · 3 comments
Closed

Remove wp.element; embrace React #876

nylen opened this issue May 23, 2017 · 3 comments
Labels
Framework Issues related to broader framework topics, especially as it relates to javascript [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@nylen
Copy link
Member

nylen commented May 23, 2017

We already have a lot of React-specific code in various places in the editor, so the wp.element.createElement abstraction has been more confusing than helpful for a while now. It seems to me like we are trying to pretend that we're not tied to using React, but this is a giant, untested assumption. I see two possible ways forward here:

  1. Test this assumption and solidify our abstraction by proving that it is possible to switch to a different view rendering engine.
  2. Drop the assumption and call our use of React by the name React.

Per recent discussion in core Slack, WP core has basically decided to adopt React. We are now well-positioned to prefer option (2) and remove as much of wp.element as possible.

@nylen nylen added Framework Issues related to broader framework topics, especially as it relates to javascript [Type] Task Issues or PRs that have been broken down into an individual action to take labels May 23, 2017
@aduth
Copy link
Member

aduth commented May 23, 2017

With React 16 noisily warning about using PropTypes and createClass (two top-level API members we'd targeted as discouraging with the abstraction), this might be reasonable to consider.

@ellatrix
Copy link
Member

Agreed.

@dmsnell
Copy link
Member

dmsnell commented Jun 14, 2017

Embrace React, embrace ReasonML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues related to broader framework topics, especially as it relates to javascript [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

No branches or pull requests

5 participants