frankcollins3 / Next-Water-App

Happy, Healthy Water Cycling App that tracks user/human fluid intake.
https://next-water-app.vercel.app
1 stars 0 forks source link

Next.js 13.4.9 routing [2:36am] #3

Closed frankcollins3 closed 1 year ago

frankcollins3 commented 1 year ago

attempting to do: ready the app for GraphQL, redux, to bring (waterapp/fill_cont) UI in since it's ready to deploy. "next": "13.0.3", and there is a pages/ folder where the file name becomes the route name. pages/api is API. Screen Shot 2023-07-07 at 2 35 20 AM

made pages folder to test a file... empty right now (notice drop down arrow facing downward to indicate showing of contents) Screen Shot 2023-07-07 at 2 34 03 AM

13.0.3: pages/hi.tsx -----------> localhost:3000/hi -----------> render file

13.4.9 app/hi.tsx -------------> localhost:3000/hi ------------> 404 not found

proposed approach: 0: create pages/ folder from which to render contents // listed in this issue as unsuccessful approach. probably obvious just keep digging.

frankcollins3 commented 1 year ago

looks hopeful already https://www.youtube.com/watch?v=gQDzu7lmtfM [2:39am]

frankcollins3 commented 1 year ago

super easy. page renders because page is the name of the rendered file. Routes would be created like so:

app/ hi/ 👍 page.tsx ------------> export default function Hi () { return ( <h1> hi </h1> ) }

[3:20am]

thank you @oliverthedev (no affiliation) https://www.youtube.com/@oliverthedev/videos