Starter Kit for projects using React + Typescript.
You need to install nodejs for your OS environment.
- React
- react
- create-react-app
- react-router@v4
- react-helmet
- react-hot-loader@v4
- react-loadable
- Redux
- react-redux
- redux-actions
- redux-logger
- redux-thunk
- redux-promise-middleware
- redux-saga
- immutable
- MobX
- mobx-react
- Typescript
- CSS Framework
- semantic-ui-css
- semantic-ui-react
- Server Side Rendering
- express
- Module Loader/bundler
- webpack
- Package Manager
- yarn
npm install
npm run start
npm run build
npm run serve
// redux-saga
...
import { Provider } from 'react-redux';
import configureStore from '../redux-saga/store';
const store = configureStore();
// redux-thunk
...
import { Provider } from 'react-redux';
import store from '../redux-thunk/store';
// mobx
import { Provider } from 'mobx-react';
import Store from '../mobx/Store';
const store = new Store();
...
...
// redux-saga
import { Provider } from 'react-redux';
import configureStore from '../redux-thunk/store';
const store = configureStore();
// redux-thunk
import { Provider } from 'react-redux';
import store from '../redux-thunk/store';
// mobx
import { toJS } from 'mobx';
import { Provider } from 'mobx-react';
import Store from '../mobx/Store';
const store = new Store()
...
...
const render = async (location: string) => {
....
return {
html,
// redux-thunk, redux-saga
state: store.getState(),
// mobx
state: toJS(store),
helmet,
};
};
+-- src
| +-- client
| +-- Root.tsx
| +-- components
| +-- pages
| +-- Menu.tsx
| +-- redux-saga
| +-- actions
| +-- api
| +-- reducers
| +-- sagas
| +-- store.ts
| +-- redux-thunk
| +-- reducers
| +-- store.ts
| +-- server
| +-- render.tsx
| +-- App.tsx
| +-- index.tsx
MIT © pjb0811