diff --git a/element/index.js b/element/index.js index e35c715b077386..bc5abe635ee8c2 100644 --- a/element/index.js +++ b/element/index.js @@ -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 { @@ -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. * diff --git a/lib/client-assets.php b/lib/client-assets.php index f3ff9e23a4a113..2fd91792ce7f09 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -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'; diff --git a/package-lock.json b/package-lock.json index a6a22906854f10..9a76bf81da1b12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9860,9 +9860,9 @@ "integrity": "sha512-6YpsC4JFT7zVG8/8gIXxdnrlHdz64/H7dpjHgXNCy5kwy2DIG1dVbdgASNUTwy4AaHgI8rvjJJzr2BxZAVu/3Q==" }, "react": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.2.0.tgz", - "integrity": "sha512-ZmIomM7EE1DvPEnSFAHZn9Vs9zJl5A9H7el0EGTE6ZbW9FKe/14IYAlPbC8iH25YarEQxZL+E8VW7Mi7kfQrDQ==", + "version": "16.3.0-alpha.1", + "resolved": "https://registry.npmjs.org/react/-/react-16.3.0-alpha.1.tgz", + "integrity": "sha512-ukD/yaNKHAZLYMAHuwvIdxlb1HQovrRxmrQDHw2MNxyKlOoELJzMUdFh8bsLwheV05zqQ5nHbL5zEuVjcH3nwA==", "requires": { "fbjs": "0.8.16", "loose-envify": "1.3.1", @@ -9958,9 +9958,9 @@ } }, "react-dom": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.2.0.tgz", - "integrity": "sha512-zpGAdwHVn9K0091d+hr+R0qrjoJ84cIBFL2uU60KvWBPfZ7LPSrfqviTxGHWN0sjPZb2hxWzMexwrvJdKePvjg==", + "version": "16.3.0-alpha.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.3.0-alpha.1.tgz", + "integrity": "sha512-1HYvdyslO5D0d6C1mGqzyz7V+wzjLcUcj14a7DEEseV3eEn6fPvq4wAGHguG+QbXHkelrrkxh2sgLr/vFA0UYA==", "requires": { "fbjs": "0.8.16", "loose-envify": "1.3.1", diff --git a/package.json b/package.json index 1ff669f6d8d956..85336b69f59ea5 100644 --- a/package.json +++ b/package.json @@ -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",