#414·router

Typescript set type for location.state?

Author: brunoschuermansCreated Aug 24, 2020Updated Oct 9, 2023

I Have a question

How do you specify the type of location.state in typescript? Trying to access location.state.x gives an error in typescript because location.state is of type {}. Thanks