Skip to content

How to deal with component with async and sync possbilities? #279

Answered by DavidVujic
zh0uquan asked this question in Q&A
Discussion options

You must be logged in to vote

If they do very different things (and use different third-party dependencies) behind the functions, then it could be good to separate them into different components. If it is the same basic functionality in both of them, it could be a good thing to have them in the same component. Or even extract some of the shared code into separate component(s) too (smaller LEGO bricks).

In short, it depends 😄 (sorry)

If you keep the components small, then it shouldn't be too much work changing them to separate/combined if it turns out it was the wrong decision.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@zh0uquan
Comment options

@DavidVujic
Comment options

Answer selected by zh0uquan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants