Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Modern JavaScript tooling is too complicated?. Parent comment
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?
There are no comments on this comment yet.
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?