Using factory template with React

Say I have a really dumb component A. I don’t want any of the data visualization logic to go into this component. Just grab some raw data and show it.

What is the more responsive to this?

  • Creating only the standard factory bot function, which, taking into account different flags, will create a new component with a different set of details
  • Creating a packaging component that follows all the logic and sets the correct details from the data.

My fear of creating a wrapper is just bloating in a chain of components. When it feels more tangential.

+4
source share

All Articles