1

my team is faced to the problem of highly reusable components. We develop dashboard for multiple apps. Many dashboard share graphs or components like toast to display errors. As our team is very small we would like to speed up development time by improving the reusability of the shared components.

  1. In most dashboard the data fetching is done in the dashboard component. But in some dashboard some graphs need to fetch locally.

  2. Those components with local data fetching still have to be available for e.g. the error toast component. So if a local fetching fails the error toast can display an error.

  3. One graph might fetch once in one dashboard but might poll or use websockets in another dashboard.

In general the three points are:

  1. Moving state up in the component tree while developing.

  2. Having components listen to each other

  3. Replace implementations of abstractly equal behaviour (e.g. fetching, polling and websockets).

We currently use redux and redux-observable which we appreciate for the clear separation (state changes, effects, action types, action creators, selectors) and the global message stream. It would be great to have small modules that a component can load but that can also be accessed by parent components.

Does somebody know a good library to solve those issues? Or does somebody solved those issues with another approach?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.