-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[using-inferno] Update inferno to v7.3, fix missing React.createConte…
…xt function (#9038) * Update inferno examples to v7.3 * Add polyfill for React.createContext * Alias react and react-dom with inferno-compat * Fix linter errors * Add warning about hooks and suspense support
- Loading branch information
1 parent
ff5d5c5
commit 52023fe
Showing
5 changed files
with
29 additions
and
9 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
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 @@ | ||
const React = require('inferno-compat') | ||
const createContext = require('create-react-context/lib/implementation') | ||
|
||
Object.keys(React).forEach(key => { | ||
if (key === 'default' || key === '__esModule') return | ||
exports[key] = React[key] | ||
}) | ||
|
||
// bypass export of React.createContext | ||
exports.createContext = createContext | ||
exports.default = React.default |
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
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