Skip to content

Commit

Permalink
Framework: Upgrade React version.
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Feb 13, 2018
1 parent 74faf60 commit 15cd537
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
11 changes: 10 additions & 1 deletion element/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { createElement, Component, cloneElement, Children, Fragment } from 'react';
import { createContext, createElement, Component, cloneElement, Children, Fragment } from 'react';
import { render, findDOMNode, createPortal, unmountComponentAtNode } from 'react-dom';
import { renderToStaticMarkup } from 'react-dom/server';
import {
Expand Down Expand Up @@ -71,6 +71,15 @@ export { Children };
*/
export { Fragment };

/**
* Creates a context object containing two components: a provider and consumer.
*
* @param {object} defaultValue Data stored in the context.
*
* @return {Object} Context object.
*/
export { createContext };

/**
* Creates a portal into which a component can be rendered.
*
Expand Down
6 changes: 3 additions & 3 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,16 +345,16 @@ function gutenberg_register_vendor_scripts() {

gutenberg_register_vendor_script(
'react',
'https://unpkg.com/react@16.2.0/umd/react' . $react_suffix . '.js'
'https://unpkg.com/react@16.3.0-alpha.1/umd/react' . $react_suffix . '.js'
);
gutenberg_register_vendor_script(
'react-dom',
'https://unpkg.com/react-dom@16.2.0/umd/react-dom' . $react_suffix . '.js',
'https://unpkg.com/react-dom@16.3.0-alpha.1/umd/react-dom' . $react_suffix . '.js',
array( 'react' )
);
gutenberg_register_vendor_script(
'react-dom-server',
'https://unpkg.com/react-dom@16.2.0/umd/react-dom-server.browser' . $react_suffix . '.js',
'https://unpkg.com/react-dom@16.3.0-alpha.1/umd/react-dom-server.browser' . $react_suffix . '.js',
array( 'react' )
);
$moment_script = SCRIPT_DEBUG ? 'moment.js' : 'min/moment.min.js';
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
"prop-types": "15.5.10",
"querystringify": "1.0.0",
"re-resizable": "4.0.3",
"react": "16.2.0",
"react": "16.3.0-alpha.1",
"react-autosize-textarea": "2.0.0",
"react-click-outside": "2.3.1",
"react-color": "2.13.4",
"react-datepicker": "0.61.0",
"react-dom": "16.2.0",
"react-dom": "16.3.0-alpha.1",
"react-redux": "5.0.6",
"redux": "3.7.2",
"redux-multi": "0.1.12",
Expand Down

0 comments on commit 15cd537

Please sign in to comment.