0

I understand, why I have to interact with DOM through dispatcher in cases when I fetching data from database.

But should i use Flux way to do something like this:

Parent component have been rendered. It has two child components. One of them initially rendered, the second child should replace first child onClick on some button. All components are static (no database connection).

So, how should I implement this action onClick and replace first child with second one?

stkvtflw
  • 12,092
  • 26
  • 78
  • 155

1 Answers1

0

Dispatch event once the onClick has been fired, parent component should listen and re-render the new item.

gor181
  • 1,988
  • 1
  • 14
  • 12