ash-bergs / pantry-pal

Keep track of your shopping list and pantry stock
0 stars 0 forks source link

Fix routing flow and structure #41

Open ash-bergs opened 1 week ago

ash-bergs commented 1 week ago

We don't get routing handled for us out of hte box as we do with Next.... and I would like to be able to retain state between page changes, which means we'll need to create something like a page router of our own.

From a high level I think this will work like:

  1. One html file to hold all content
  2. Lisen for clicks with JS and a routing script
  3. Script uses history API to move user around
ash-bergs commented 1 week ago

This change will require changing how we bundle the JS? 🤔

RIght now it's set up to bundle what's needed per page - see the common config. I did this because it seemed like the right way to do it at the time, but this opens the door to reviewing how we're handling all this JS anyway 😋

However, I'm getting to a point where after adding a few more features - like editing items and lists, and updating the upload/download - I think it would be better to use this experiment as a jumping off point for creating Pantry Pal with React Native.

I foresee setting up a Pantry to become quite involved, with lots and state flowing through the app, alerting, and more. While working on this project has had a ton of value, it makes more logical sense to build with React Native if I intend on this feeling and operating as a full fledged app.