News for hackers. Stuff that matters.
Re:Modern JavaScript tooling is too complicated? by mosdl on Thursday August 22, 2019 @08:47PM (#20773716)
Redux forces you to write lots of ugly boilerplate, its the same way in all code bases that use it.
Re:Modern JavaScript tooling is too complicated? by davidjnelson on Thursday August 22, 2019 @11:28PM (#20774309)
// 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?