Notes on Remix
-
Every
.tsxcan export aloaderfunction- Itβs good practice to move the logic in this function to a
[file].server.tsin amodelsdirectory.
- Itβs good practice to move the logic in this function to a
-
Every
.tsxcan also support anactio -
File based routing works different to Next.js. You can the name of the file will correspond the route its on and will only render if it matches. This must be using in conjuction with the
Outletcomponent -
Remix projects will have
.serverand.clientfile extension names . These are not just naming conventions but also are hints to the Remix compiler to prevent server code leaking into client side code and vice versa. It can help with tree shaking.
References