Content
@
0 reply
0 recast
2 reactions
killjoy.eth
@killjoy
A pattern I’ve settled into is using folder structure to connote the context where a component in an application is intended to be used. Components live in a folder with two directories: components (aka children) and “shared”. Children can go up the tree to import from shared folders, but should never enter a parent “components” folder. When it’s time to make a component more general purpose it gets hoisted up to the shared folder of the nearest common ancestor of the components that will use it.
3 replies
0 recast
5 reactions
glitter @ ethcc
@glttr
wow the amount of bot replies on this. but why do you like this structure? I’ve find that flatter and descriptive file names is easier. my only folders now are: pages screens components
0 reply
0 recast
0 reaction