Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
feat(initClient): removed StrictMode, resolves #74 (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
10xLaCroixDrinker committed Apr 30, 2020
1 parent bcfb319 commit 890a7e8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 25 deletions.
36 changes: 17 additions & 19 deletions __tests__/client/__snapshots__/initClient.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,22 @@ Immutable.Map {
`;

exports[`initClient should use strict mode 1`] = `
<StrictMode>
<Provider
store={
Object {
"dispatch": [Function],
"getState": [Function],
"modules": Immutable.Map {},
"rebuildReducer": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
Symbol(observable): [Function],
}
<Provider
store={
Object {
"dispatch": [Function],
"getState": [Function],
"modules": Immutable.Map {},
"rebuildReducer": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
Symbol(observable): [Function],
}
>
<Router
render={[Function]}
testProp="test"
/>
</Provider>
</StrictMode>
}
>
<Router
render={[Function]}
testProp="test"
/>
</Provider>
`;
10 changes: 4 additions & 6 deletions src/client/initClient.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* permissions and limitations under the License.
*/

import React, { StrictMode } from 'react';
import React from 'react';
import { hydrate } from 'react-dom';
import { Provider } from 'react-redux';
import { browserHistory, Router } from '@americanexpress/one-app-router';
Expand Down Expand Up @@ -48,11 +48,9 @@ export default async function initClient() {

/* eslint-disable react/jsx-props-no-spreading */
const App = () => (
<StrictMode>
<Provider store={store}>
<Router {...renderProps} />
</Provider>
</StrictMode>
<Provider store={store}>
<Router {...renderProps} />
</Provider>
);
/* eslint-enable react/jsx-props-no-spreading */

Expand Down

0 comments on commit 890a7e8

Please sign in to comment.