1.0.0-alpha.14 • Published 5 years ago
@christophediprima/razzle-react-redux-observable-found v1.0.0-alpha.14
razzle-react-redux-observable-found
Bootstrap Razzle full SRR React App with Redux-Observable and Found
Install
npm install --save razzle-react-redux-observable-found
Basic Usage
// server.ts
import express from 'express';
import { createServerConfig } from '@christophediprima/razzle-react-redux-observable-found';
import Action from './core/Action';
import State from './core/State';
import rootEpic from './core/rootEpic';
import rootReducer from './core/rootReducer';
import routes from './core/routes';
const razzleAssets = require(process.env.RAZZLE_ASSETS_MANIFEST || '');
const server = express();
const initialState = {
board: {
list: [],
loading: false,
},
};
const serverConfig = createServerConfig<State, Action>({ initialState, razzleAssets, rootEpic, rootReducer, routes });
server
.disable('x-powered-by')
.use(express.static(process.env.RAZZLE_PUBLIC_DIR || ''))
.get('/*', serverConfig);
export default server;
// client.ts
import './client.css';
import { createClientConfig } from '@christophediprima/razzle-react-redux-observable-found';
import Action from './core/Action';
import State from './core/State';
import rootEpic from './core/rootEpic';
import rootReducer from './core/rootReducer';
import routes from './core/routes';
createClientConfig<State, Action>(rootEpic, rootReducer, routes);
Have a look at the example for usage with a custom document and extra providers!
razzle-react-redux-observable-found is build with create-react-library
Inspirations
License
MIT © christophediprima
1.0.0-alpha.14
5 years ago
1.0.0-alpha.12
5 years ago
1.0.0-alpha.11
5 years ago
1.0.0-alpha.10
5 years ago
1.0.0-alpha.9
5 years ago
1.0.0-alpha.8
5 years ago
1.0.0-alpha.7
5 years ago
1.0.0-alpha.6
5 years ago
1.0.0-alpha.5
5 years ago
1.0.0-alpha.4
5 years ago
1.0.0-alpha.3
5 years ago
1.0.0-alpha.2
5 years ago
1.0.0-alpha.1
5 years ago