getInitialState
// JavaScript
function getInitialState(reducer)// TypeScript
function getInitialState<S>(reducer: Reducer<S>): SDetails
Examples
import { getInitialState } from 'redux-preboiled'
const reducer = (state = 0, action) =>
action.type === 'increment' ? state + 1 : state
getInitialState(reducer)
// => 0See Also
Last updated