What Legos Can Teach Us About Reuse in React Apps
React is a component library. So React makes it easy to break your UI down into composable pieces. The question is, how granular should the pieces be?
Let’s consider a specific example that I explored in a previous post.
Imagine your team just deployed a ToDo app, built in React. A month later, another team in your company wants to run your ToDo app within their invoice app, also built in React.
So now you need to run your ToDo app in two spots:
- By itself
- Embedded within the invoice app
What’s the best way to handle that? 🤔