3 ms·
Redux forces you to write lots of ugly boilerplate, its the same way in all code bases that use it.
by mosdl 7y ago
Redux forces you to write lots of ugly boilerplate, its the same way in all code bases that use it.
- davidjnelson 7y ago// reuse this export const createAction<T>(type: string, payload: T) => { return { type, payload }; }; // some component onClick={event => dispatch(createAction<SomeInterface>(TYPE_CONSTANT, event.target.value))} Where’s the boilerplate?