I am using the react-bootstrap Modal, Form and Button.
(我正在使用react-bootstrap模式,窗体和按钮。)
Desiring the functionality of clicking the button should open the modal with a form inside it.
(希望单击按钮的功能应打开包含其内部表单的模式。)
After filling out the form, one clicks a button (on the modal ) and it validates the form data and posts it through a REST API.(填写表单后,单击一个按钮(在modal上 ),它会验证表单数据并通过REST API将其发布。)
I got far enough to figure out that my component split should be as follows:
(我已经很清楚找出我的组件拆分应该如下:)
A button component, a modal component and a form component.
(按钮组件,模式组件和表单组件。)
What would be the correct way to structure these components in terms of props/state and placing the functions for validating the data?
(用道具/状态和放置用于验证数据的功能来构造这些组件的正确方法是什么?)
I am having trouble in understanding the child/parent relationship and when it's applicable(我在理解孩子/父母之间的关系以及何时适用时遇到了麻烦)
ask by Alex5207 translate from so