React Noob Tries Remix SPA
Published:
Goals:
- Define Model for Recipe
- Populate 2-5 Recipes in Server
- Build Basic UI
Notes:
Recipe Data Model:
- Name - Text
- URL - Text
- Ingredients - Rich Text
- Macros - JSON
- Instructions - Rich Text
- Author - Text
- Slug - Text
- Cooking Time - Text
Questions / Answers
Q: Is JSON an okay data structure for now? What will I be missing out on? A: Yeah, it seems like it will be fine - according to this you can sort/filter on the JSON fields: https://github.com/pocketbase/pocketbase/issues/423
Q: What is a Rich Text field in Pocketbase? Does it matter? A: Outputs HTML, used Tailwind Typography/Prose
Q: How are you supposed to submit forms in Remix SPA? A: My code was working, I just completely glossed over this:
FormData is not a plain object but a class instance and every value is hidden
TODO - Next Steps
- Auth
- Export to Markdown?
- CRUD
- Does a recipe need to be under an author? /author-slug/recipe-slug?