What's the right way to pass form element state to sibling/parent elements?

后端 未结 10 748
情话喂你
情话喂你 2020-11-29 15:04
  • Suppose I have a React class P, which renders two child classes, C1 and C2.
  • C1 contains an input field. I\'ll refer to this input field as Foo.
  • M
10条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 15:25

    You should learn Redux and ReactRedux library.It will structure your states and props in one store and you can access them later in your components .

提交回复
热议问题