DEV Community

Discussion on: React Context with useReducer and Typescript.

 
elisealcala profile image
Elizabeth Alcalá

Hey, you are right, type assertion works well in this case, it makes the code look cleaner without the union types.

Thanks a lot.