app/routes/index.jsx Not Rendering #811
-
Hello, I have installed hydrogen on Windows 11 and have installed the 'Hello, World' template and linked it to my shopify account using my storefront token. I can run that successfully. I create a new app/routes/index.jsx file as per the documentation here https://shopify.dev/docs/custom-storefronts/hydrogen/building/begin-development#step-4-create-a-route. When I save the file, my browser still shows the initial boilerplate screen with the "Start Building" and "Resources" links. In fact, I edit my app/root.jsx file directly and still see no changes. How can I render my app/routes/index.jsx file? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Thanks for pointing this out, we recently updated hydrogen to use v2 routing. Which version of hydrogen are you using? |
Beta Was this translation helpful? Give feedback.
-
I've got an update to the tutorial that will go live today that should smooth this out. For now, you can use the file name For more info on why this has changed, you can look to the V2 Routing docs |
Beta Was this translation helpful? Give feedback.
-
Thank you @DavidWittness and @lordofthecactus, changing the file name to _index.jsx helped fix the problem. |
Beta Was this translation helpful? Give feedback.
I've got an update to the tutorial that will go live today that should smooth this out.
For now, you can use the file name
_index.jsx
instead ofindex.jsx
and that should get you unblocked.For more info on why this has changed, you can look to the V2 Routing docs