DEV Community

Discussion on: A quick start guide to creating an app with Preact, TypeScript and Ruby on Rails

Collapse
emma profile image
Emma Goto 🍙 Author

You should see some sort of "hello world" files inside of app/javascript, and they might be initially created as a .js file. Since you're switching to using TypeScript, you'll need to update those files to get TypeScript to work properly.

If your code is rendering a Preact component you'll want it to end in .tsx, if you have a file that only has some functions (e.g. a util file) then you'll need .ts.

Hope that helps!