DEV Community

loading...

Discussion on: React Context with useReducer and Typescript.

elisealcala profile image
Elizabeth Alcalá Author

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

Thanks a lot.