You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I'm going to try to shoehorn three different things into one ticket under a pretty vague umbrella of "data"
pages & components
I find the project structure a little bit confusing, because I'm used to pages and components being separated, where components are stand alone functional UI/UX blocks, and pages are a combination of these blocks adding margin and padding (and arguably page-specific content, although I reckon any page could be made entirely of separate components, where all the page adds is layout of these. For example DisplayCityPage lives inside cityPageComponents, which could be confusing.
I would group your components by what they do, rather than where they're used - for example components/detailPageComponents/SeeMore would more typically live somewhere like components/buttons/SeeMore
env variables
as a general rule of thumb, if you see a random looking string on the page, it belongs in .env. if it isn't secretive (and this one may not be) I would still notice it and save it somewhere else, e.g. a file for hard coded project values.
it seems to me that amenities should live in the database and not hardcoded as an array in the project. when I say arbitrary content, I mean that they could change at any time, and your codebase should be indifferent to that (i.e. right now if you edit that array, various things will break - ideally you want to be able to make edits to amenities in the database, and the frontend to carry on happily without really noticing)
The text was updated successfully, but these errors were encountered:
jackherizsmith
changed the title
Feedback: where data should be
Feedback: where things should be
Nov 15, 2023
So I'm going to try to shoehorn three different things into one ticket under a pretty vague umbrella of "data"
pages & components
I find the project structure a little bit confusing, because I'm used to pages and components being separated, where components are stand alone functional UI/UX blocks, and pages are a combination of these blocks adding margin and padding (and arguably page-specific content, although I reckon any page could be made entirely of separate components, where all the page adds is layout of these. For example
DisplayCityPage
lives insidecityPageComponents
, which could be confusing.I would group your components by what they do, rather than where they're used - for example
components/detailPageComponents/SeeMore
would more typically live somewhere likecomponents/buttons/SeeMore
env variables
as a general rule of thumb, if you see a random looking string on the page, it belongs in
.env
. if it isn't secretive (and this one may not be) I would still notice it and save it somewhere else, e.g. a file for hard coded project values.arbitrary content > database
it seems to me that
amenities
should live in the database and not hardcoded as an array in the project. when I say arbitrary content, I mean that they could change at any time, and your codebase should be indifferent to that (i.e. right now if you edit that array, various things will break - ideally you want to be able to make edits toamenities
in the database, and the frontend to carry on happily without really noticing)The text was updated successfully, but these errors were encountered: