-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Prepare react-dom-factories
for publishing
#9823
Conversation
**what is the change?:** - copies the `React.DOM.*` factory helpers into the package and wraps them with an IIFE - set peerDependency on React to latest 15 version **why make this change?:** We are deprecating `React.DOM.*` and this provides a fallback option for those using it. We just copied the code in order to avoid a circular dependency, which keeps complexity down since we are supporting every possible build system. **test plan:** TODO - 1. Copy this into one of our fixtures using a UMD/AMD build and see if it works there. 2. Do an initial publish of the package on npm and then pull it into CRA, and try it there. 3. Try it in https://github.com/duncanbeevers/jade-react or some other project that actually uses the `React.DOM.*` helpers, using the related codemod. **issue:** facebook#9398
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtmacro
} | ||
|
||
if (typeof g.React === "undefined") { | ||
throw Error("React module should be required before reactDOMFactories"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReactDOMFactories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing else beyond what Ben said. Looks good to me!
**what is the change?:** Fixing nits in capitalization, quotes, and defined globals **why make this change?:** To get CI passing, consistency, correctness **test plan:** see prev. commit **issue:** facebook#9398
* Prepare `react-dom-factories` for publishing **what is the change?:** - copies the `React.DOM.*` factory helpers into the package and wraps them with an IIFE - set peerDependency on React to latest 15 version **why make this change?:** We are deprecating `React.DOM.*` and this provides a fallback option for those using it. We just copied the code in order to avoid a circular dependency, which keeps complexity down since we are supporting every possible build system. **test plan:** TODO - 1. Copy this into one of our fixtures using a UMD/AMD build and see if it works there. 2. Do an initial publish of the package on npm and then pull it into CRA, and try it there. 3. Try it in https://github.com/duncanbeevers/jade-react or some other project that actually uses the `React.DOM.*` helpers, using the related codemod. **issue:** facebook#9398 * Fix lints and capitalization of 'reactDOMFactories' **what is the change?:** Fixing nits in capitalization, quotes, and defined globals **why make this change?:** To get CI passing, consistency, correctness **test plan:** see prev. commit **issue:** facebook#9398
what is the change?:
React.DOM.*
factory helpers into the package and wrapsthem with an IIFE
why make this change?:
We are deprecating
React.DOM.*
and this provides a fallback option forthose using it.
We just copied the code in order to avoid a circular dependency, which
keeps complexity down since we are supporting every possible build
system.
test plan:
DONE -
it works there.
TODO -
2. Do an initial publish of the package on npm and then pull it into
CRA, and try it there.
3. Try it in https://github.com/duncanbeevers/jade-react or some other
project that actually uses the
React.DOM.*
helpers, using therelated codemod.
issue:
#9398