-
-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add a new `render` method to use render props pattern - Fix all issues with SSR BREAKING CHANGE: loadable-components/babel is now required if you do server side rendering. BREAKING CHANGE: ErrorComponent now receive `ownProps` instead of `props`.
- Loading branch information
Showing
52 changed files
with
6,306 additions
and
1,047 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,3 +1,5 @@ | ||
node_modules/ | ||
/lib/ | ||
/coverage/ | ||
__fixtures__ | ||
example |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
node_modules/ | ||
node_modules | ||
/lib/ | ||
/coverage/ | ||
/coverage |
This file was deleted.
Oops, something went wrong.
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,4 +1,7 @@ | ||
/* | ||
!/lib/*.js | ||
!/babel.js | ||
!/server.js | ||
!/lib/**/*.js | ||
__fixtures__ | ||
*.test.js | ||
setupTests.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,5 @@ | ||
node_modules/ | ||
/lib/ | ||
/coverage/ | ||
__fixtures__ | ||
CHANGELOG.md |
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,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"semi": false | ||
} |
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,3 +1,20 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- "node" | ||
- 8 | ||
|
||
before_install: | ||
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2 | ||
- export PATH="$HOME/.yarn/bin:$PATH" | ||
|
||
script: | ||
- yarn ci | ||
|
||
notifications: | ||
email: false | ||
|
||
cache: | ||
yarn: true | ||
directories: | ||
- ".eslintcache" | ||
- "node_modules" |
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 @@ | ||
module.exports = require('./lib/babel').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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"presets": ["react", ["env", { | ||
"targets": { | ||
"node": "current" | ||
} | ||
}]], | ||
"plugins": [ | ||
"dynamic-import-node", | ||
"loadable-components/babel", | ||
["transform-class-properties", { "loose": true }], | ||
"transform-object-rest-spread" | ||
] | ||
} |
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 @@ | ||
public/*.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,12 @@ | ||
import React from 'react' | ||
import loadable from 'loadable-components' | ||
|
||
const AsyncWhat = loadable(() => import('./What.js')) | ||
|
||
const App = () => ( | ||
<div> | ||
Hello <AsyncWhat />! | ||
</div> | ||
) | ||
|
||
export default App |
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,3 @@ | ||
const Amazing = () => 'Amazing' | ||
|
||
export default Amazing |
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,3 @@ | ||
const World = () => 'World' | ||
|
||
export default World |
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,19 @@ | ||
import React from 'react' | ||
import loadable from 'loadable-components' | ||
|
||
const What = loadable( | ||
async () => { | ||
const { default: DeepWord } = await import('./DeepWorld') | ||
const { default: DeepAmazing } = await import('./DeepAmazing') | ||
return () => ( | ||
<React.Fragment> | ||
<DeepAmazing /> <DeepWord /> | ||
</React.Fragment> | ||
) | ||
}, | ||
{ | ||
LoadingComponent: () => 'Loading...', | ||
}, | ||
) | ||
|
||
export default What |
Oops, something went wrong.