Client Page component query parameter
On the following part of the doc: https://wasp-lang.dev/docs/language/features#accessing-route-parameters-in-a-page-component
The doc is using jsx and not tsx (typescript), is it possible to have a type for the function to have typescript autocompletion in props ?
6 Replies
@0xtlt that would be great yes! We have just recently upped our TS game significantly, and we haven't covered this part yet, but certainly we can do it. Let me ping @Filip he is our TS expert -> let's create a GH issue for this?
Hey @0xtlt, you can change the file's extension to
tsx
and use TypeScript as you normally would. The same goes for using React Router's types
Relevant docs (picture taken from this site): https://wasp-lang.dev/docs/tutorials/todo-app/01-creating-new-project
And for all TS-supported features: https://wasp-lang.dev/docs/typescript
If you're asking whether we have something like this provided out of the box:
The answer is: Not yet! But, as @martinsos said, we're planning to add it soon!
Hopefully the manual typing will do for now!
alright thank you @Filip, it is clear for me 🙂
Wohooo @0xtlt, you just became a Waspeteer level 1!