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

Upgrade to React 16. #97

Merged
merged 1 commit into from
Mar 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"presets": ["flow", "react", "es2015", "stage-0"],
"presets": ["flow", "react", "env", "stage-0"],
"plugins": [
"transform-runtime",
"add-module-exports",
Expand All @@ -11,16 +11,23 @@
"development": {
"plugins": [
"typecheck",
["react-transform", {
"transforms": [{
[
"react-transform",
{
"transforms": [
{
"transform": "react-transform-catch-errors",
"imports": ["react", "redbox-react"]
}
]
}],
["react-intl", {
"messagesDir": "./dist/messages/"
}]
}
],
[
"react-intl",
{
"messagesDir": "./dist/messages/"
}
]
]
}
}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* Added social sharing @robgietema
* Added commenting @robgietema
* Added tags @robgietema
* Upgrade to React 16 @sneridagh

## 0.4.0 (2017-05-03)

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@
"pretty-error": "2.1.1",
"promise-file-reader": "1.0.2",
"prop-types": "15.6.1",
"react": "15.6.2",
"react": "16.2.0",
"react-cookie": "1.0.5",
"react-dnd": "2.5.4",
"react-dnd-html5-backend": "2.5.4",
"react-dom": "15.6.2",
"react-dom": "16.2.0",
"react-dropzone": "4.2.9",
"react-helmet": "5.2.0",
"react-inline-css": "2.3.1",
Expand Down Expand Up @@ -272,7 +272,7 @@
"react-addons-test-utils": "15.6.2",
"react-stateless-wrapper": "1.0.7",
"react-templates": "0.6.1",
"react-test-renderer": "15.6.2",
"react-test-renderer": "16.2.0",
"react-transform-catch-errors": "1.0.2",
"react-transform-hmr": "1.0.4",
"redbox-react": "1.5.0",
Expand Down
4 changes: 2 additions & 2 deletions src/client.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'babel-polyfill';

import React from 'react';
import { render } from 'react-dom';
import { hydrate } from 'react-dom';
import { Provider } from 'react-intl-redux';
import { ReduxAsyncConnect } from 'redux-connect';
import { browserHistory, Router } from 'react-router';
Expand All @@ -23,7 +23,7 @@ const history = syncHistoryWithStore(browserHistory, store);
addLocaleData([...nlLocaleData, ...deLocaleData, ...enLocaleData]);
persistAuthToken(store);

render(
hydrate(
<Provider store={store} key="provider">
<Router
render={props => <ReduxAsyncConnect helpers={{ api }} {...props} />}
Expand Down
3 changes: 2 additions & 1 deletion src/error.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
* @module Error
*/

import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';

/**
* Error page.
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/Html/__snapshots__/Html.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ exports[`Html renders a html component 1`] = `
<div
dangerouslySetInnerHTML={
Object {
"__html": "<div data-reactroot=\\"\\" data-reactid=\\"1\\" data-react-checksum=\\"1998851930\\"></div>",
"__html": "<div data-reactroot=\\"\\"></div>",
}
}
id="main"
Expand Down
38 changes: 19 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2727,7 +2727,7 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
safe-buffer "^5.0.1"
sha.js "^2.4.8"

create-react-class@^15.5.1, create-react-class@^15.6.0:
create-react-class@^15.5.1:
version "15.6.0"
resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.0.tgz#ab448497c26566e1e29413e883207d57cfe7bed4"
dependencies:
Expand Down Expand Up @@ -9208,14 +9208,14 @@ react-dock@^0.2.4:
lodash.debounce "^3.1.1"
prop-types "^15.5.8"

react-dom@15.6.2:
version "15.6.2"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.2.tgz#41cfadf693b757faf2708443a1d1fd5a02bef730"
react-dom@16.2.0:
version "16.2.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.2.0.tgz#69003178601c0ca19b709b33a83369fe6124c044"
dependencies:
fbjs "^0.8.9"
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.0"
prop-types "^15.5.10"
object-assign "^4.1.1"
prop-types "^15.6.0"

react-dropzone@4.2.9:
version "4.2.9"
Expand Down Expand Up @@ -9417,12 +9417,13 @@ react-templates@0.6.1:
optionator "0.8.2"
text-table "0.2.0"

react-test-renderer@15.6.2:
version "15.6.2"
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-15.6.2.tgz#d0333434fc2c438092696ca770da5ed48037efa8"
react-test-renderer@16.2.0:
version "16.2.0"
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.2.0.tgz#bddf259a6b8fcd8555f012afc8eacc238872a211"
dependencies:
fbjs "^0.8.9"
object-assign "^4.1.0"
fbjs "^0.8.16"
object-assign "^4.1.1"
prop-types "^15.6.0"

react-transform-catch-errors@1.0.2:
version "1.0.2"
Expand All @@ -9435,15 +9436,14 @@ react-transform-hmr@1.0.4:
global "^4.3.0"
react-proxy "^1.1.7"

react@15.6.2:
version "15.6.2"
resolved "https://registry.yarnpkg.com/react/-/react-15.6.2.tgz#dba0434ab439cfe82f108f0f511663908179aa72"
react@16.2.0:
version "16.2.0"
resolved "https://registry.yarnpkg.com/react/-/react-16.2.0.tgz#a31bd2dab89bff65d42134fa187f24d054c273ba"
dependencies:
create-react-class "^15.6.0"
fbjs "^0.8.9"
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.0"
prop-types "^15.5.10"
object-assign "^4.1.1"
prop-types "^15.6.0"

read-all-stream@^3.0.0:
version "3.1.0"
Expand Down