Not sure it scales well in a codebase maintained by a team/company. It's like asking to team mate to learn an extra layer of abstraction that fits over vue ?
Interesting, thanks for sharing !
Tech Lead/Team Lead. Senior WebDev.
Intermediate Grade on Computer Systems-
High Grade on Web Application Development-
MBA (+Marketing+HHRR).
Studied a bit of law, economics and design
Location
Spain
Education
Higher Level Education Certificate on Web Application Development
You can decouple logic from react components without adding layers of abstraction other than the ones you'll get by default -usually- i.e. with HOCs (High Order Components) can be used for more things than just to increment New functionalities for other components. With HOCs you can actually separate responsibilities too.
You can create a HOC that accepts a React component as an argument, implements the data logic, and passes data, loading, and error as props into the wrapped React component.
This way your data and/or logic is decoupled from the UI.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Not sure it scales well in a codebase maintained by a team/company. It's like asking to team mate to learn an extra layer of abstraction that fits over vue ?
Interesting, thanks for sharing !
Perhaps the Clean Architecture ceremony is getting in the way of the core message here.
Clean Architecture is a moniker created by Robert C. Martin as an elaboration of Alistair Cockburn's Hexagonal Architecture and as such he is a proponent of keeping frameworks at arm's length. His talk Architecture the Lost Years is relevant here as he critizes frameworks (in this case Rails) for interfering with effective solution architecture (Bring clarity to your monolith with Bounded Contexts tries to address this).
In UI As An Afterthough Michel Weststrate boils it down to one core idea:
So while his client side application is clearly a React application he can test the client side application logic without the UI (React):
A different approach to frontend architecture also demonstrates this approach by using an application specific interface instead of letting the UI bind to the stores directly.
You can decouple logic from react components without adding layers of abstraction other than the ones you'll get by default -usually- i.e. with HOCs (High Order Components) can be used for more things than just to increment New functionalities for other components. With HOCs you can actually separate responsibilities too.
You can create a HOC that accepts a React component as an argument, implements the data logic, and passes data, loading, and error as props into the wrapped React component.
This way your data and/or logic is decoupled from the UI.