Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Prevented warnings about legacy context usage from showing up in <StrictMode>. - Added a few different builds of React to the repository for running the tests under different versions of React. Helps with #6385 and #6388
- Loading branch information
Showing
311 changed files
with
262,187 additions
and
938 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# node.js | ||
node_modules/ | ||
!react-builds/*/node_modules/ | ||
npm-debug.log | ||
|
||
# lerna | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/react-router-config/modules/__tests__/utils/StrictMode.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from "react"; | ||
|
||
let StrictMode = function(props) { | ||
return props.children || null; | ||
}; | ||
|
||
if (React.StrictMode) { | ||
StrictMode = React.StrictMode; | ||
} | ||
|
||
export default StrictMode; |
10 changes: 10 additions & 0 deletions
10
packages/react-router-config/modules/__tests__/utils/renderStrict.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
|
||
import StrictMode from "./StrictMode"; | ||
|
||
function renderStrict(element, node) { | ||
return ReactDOM.render(<StrictMode>{element}</StrictMode>, node); | ||
} | ||
|
||
export default renderStrict; |
10 changes: 10 additions & 0 deletions
10
packages/react-router-config/modules/__tests__/utils/renderToStringStrict.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from "react"; | ||
import ReactDOMServer from "react-dom/server"; | ||
|
||
import StrictMode from "./StrictMode"; | ||
|
||
function renderToStringStrict(element) { | ||
return ReactDOMServer.renderToString(<StrictMode>{element}</StrictMode>); | ||
} | ||
|
||
module.exports = renderToStringStrict; |
Oops, something went wrong.