-
-
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.
Merge pull request #73 from smooth-code/various-fixes
Various fixes
- Loading branch information
Showing
20 changed files
with
2,308 additions
and
415 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 |
---|---|---|
|
@@ -2,6 +2,5 @@ node_modules/ | |
/coverage/ | ||
/dist/ | ||
__fixtures__/ | ||
/example/ | ||
CHANGELOG.md | ||
package.json |
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
File renamed without changes.
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,12 +1,19 @@ | ||
import React from 'react' | ||
import loadable from 'loadable-components' | ||
import { hot } from 'react-hot-loader' | ||
|
||
const AsyncWhat = loadable(() => import('./What.js')) | ||
const AsyncWhat = loadable(() => | ||
import(/* webpackChunkName: "What" */ './What.js'), | ||
) | ||
|
||
const AsyncBig = loadable(() => | ||
import(/* webpackChunkName: "Big" */ './Big.js'), | ||
) | ||
|
||
const App = () => ( | ||
<div> | ||
Hello <AsyncWhat />! | ||
</div> | ||
) | ||
|
||
export default App | ||
export default hot(module)(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 Big = () => 'Big' | ||
|
||
export default Big |
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,23 @@ | ||
import React from 'react' | ||
|
||
class Counter extends React.Component { | ||
state = { count: 0 } | ||
|
||
componentDidMount() { | ||
this.interval = setInterval( | ||
() => | ||
this.setState(previousState => ({ count: previousState.count + 1 })), | ||
500, | ||
) | ||
} | ||
|
||
componentWillUnmount() { | ||
clearInterval(this.interval) | ||
} | ||
|
||
render() { | ||
return this.state.count | ||
} | ||
} | ||
|
||
export default Counter |
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
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 Counter from './Counter' | ||
|
||
const World = () => ( | ||
<React.Fragment> | ||
<Counter /> World | ||
</React.Fragment> | ||
) | ||
|
||
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"execMap": { | ||
"js": "babel-node" | ||
} | ||
}, | ||
"delay": 10000 | ||
} |
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
Oops, something went wrong.