-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Upgrade React to 16.8.4: Welcome React Hooks #14400
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -380,10 +380,21 @@ function gutenberg_register_scripts_and_styles() { | |
* @since 0.1.0 | ||
*/ | ||
function gutenberg_register_vendor_scripts() { | ||
/* | ||
* This function is kept as an empty stub, in case Gutenberg should need to | ||
* explicitly provide a version newer than that provided by core. | ||
*/ | ||
$suffix = SCRIPT_DEBUG ? '' : '.min'; | ||
|
||
// Vendor Scripts. | ||
$react_suffix = ( SCRIPT_DEBUG ? '.development' : '.production' ) . $suffix; | ||
|
||
gutenberg_register_vendor_script( | ||
'react', | ||
'https://unpkg.com/[email protected]/umd/react' . $react_suffix . '.js', | ||
array( 'wp-polyfill' ) | ||
); | ||
gutenberg_register_vendor_script( | ||
'react-dom', | ||
'https://unpkg.com/[email protected]/umd/react-dom' . $react_suffix . '.js', | ||
array( 'react' ) | ||
); | ||
} | ||
|
||
/** | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -314,6 +314,66 @@ Removes any mounted element from the target DOM node. | |
|
||
- **target** `Element`: DOM node in which element is to be removed | ||
|
||
### useCallback | ||
|
||
[src/index.js#L1-L1](src/index.js#L1-L1) | ||
|
||
Make React Hooks available | ||
|
||
### useContext | ||
|
||
[src/index.js#L1-L1](src/index.js#L1-L1) | ||
|
||
Make React Hooks available | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These aren't the most helpful documentation. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mmm Right I didn't notice, we might want to just link to the React Docs here. how can we improve this, I'm not yet familiar with this new doc generator @nosolosw There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can do a couple of options:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm preparing a PR for the second option. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Awesome Thank you :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #14425 could be the minimum viable docs. |
||
|
||
### useDebugValue | ||
|
||
[src/index.js#L1-L1](src/index.js#L1-L1) | ||
|
||
Make React Hooks available | ||
|
||
### useEffect | ||
|
||
[src/index.js#L1-L1](src/index.js#L1-L1) | ||
|
||
Make React Hooks available | ||
|
||
### useImperativeHandle | ||
|
||
[src/index.js#L1-L1](src/index.js#L1-L1) | ||
|
||
Make React Hooks available | ||
|
||
### useLayoutEffect | ||
|
||
[src/index.js#L1-L1](src/index.js#L1-L1) | ||
|
||
Make React Hooks available | ||
|
||
### useMemo | ||
|
||
[src/index.js#L1-L1](src/index.js#L1-L1) | ||
|
||
Make React Hooks available | ||
|
||
### useReducer | ||
|
||
[src/index.js#L1-L1](src/index.js#L1-L1) | ||
|
||
Make React Hooks available | ||
|
||
### useRef | ||
|
||
[src/index.js#L1-L1](src/index.js#L1-L1) | ||
|
||
Make React Hooks available | ||
|
||
### useState | ||
|
||
[src/index.js#L1-L1](src/index.js#L1-L1) | ||
|
||
Make React Hooks available | ||
|
||
|
||
<!-- END TOKEN(Autogenerated API docs) --> | ||
|
||
|
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.
It's surprising that
react-test-renderer
wasn't listed before 🤷♂️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.
react wasn't listed before.
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.
Right :)