DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,503 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Bret
Bret

Posted on

REACT, reusable Components, best way to understand the layout?

What’s the best way to understand the way you setup and reuse components? So far, allot of tutorials have a functioning component, but they didnt setup the β€œuseState” yet, or β€œsetState”

Top comments (3)

Collapse
 
dance2die profile image
Sung M. Kim

Hi Bret. What'd be your scope of "re-usability"?

Within a project? Create a new file and import it.

Within a mono-repo? Link the project (Lerna, npm/yarn workspaces)
Across different projects? You might want to "npm/yarn link" or create NPM packages and import or use bit.dev etc

And more importantly What are you trying to accomplish?

Collapse
 
yobretyo profile image
Bret Author

β€œRe usable” components. That’s what react or any framework is about?

DEV has this feature:

Settings

Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. πŸ›