https://github.com/alexhtech/react-isomorphic-example
React redux isomorphic example webpack3 hot-module-replacement 3 Preloader Authorization
https://github.com/alexhtech/react-isomorphic-example
enzyme isomorphic jest preload-data react react-isomorphic-tools react-router redux server-side-rendering ssr styled-components webpack3
Last synced: 3 months ago
JSON representation
React redux isomorphic example webpack3 hot-module-replacement 3 Preloader Authorization
- Host: GitHub
- URL: https://github.com/alexhtech/react-isomorphic-example
- Owner: alexhtech
- Created: 2017-02-16T14:18:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-10T16:59:17.000Z (over 7 years ago)
- Last Synced: 2025-01-12T00:19:56.710Z (4 months ago)
- Topics: enzyme, isomorphic, jest, preload-data, react, react-isomorphic-tools, react-router, redux, server-side-rendering, ssr, styled-components, webpack3
- Language: JavaScript
- Homepage: http://react-isomorphic-example.k-3soft.com
- Size: 306 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## react-isomorphic-example v 2.2.0
### You can see demo here:
[react-isomorphic-example.k-3soft.com](http://react-isomorphic-example.k-3soft.com)
### Used libraries:
1. react-isomorphic-tools@^2.3.5
2. react-router@^4.1.1
3. react-router-dom@^4.1.1
4. react-router-config@^1.0.0-beta.3
5. react-router-redux@^5.0.0-alpha.6
6. react-hot-loader@^3
7. styled-components@^2.0.0
8. react-helmet@^5.0.3
9. react-intl@^2.3.0
10. webpack@^3.5.5
11. jest@^20.0.4
12. enzyme@^2.9.1
13. expressjs@^4.15.4### Works:
- [x] Preload data before transition
- [x] Preload data for ServerSide
- [x] Chunks implements through async func, and will run when transition is doing to that route
- [x] Handler of errors both client and server
#### Example implementations of async Routes
```js
import App from '../components/App'
const routes = [
{
component: App,
path: '/',
routes:[
{
path: '/home',
getComponent: ()=>import('../components/Home') //returns promise,
preload:({fetcher})=>{
return fetcher('/testApiData', { //return promise
method: 'GET',
params:{
id: 1
}
})
}
}
]
}
]
```
###### to be continued...