Reactjs 将道具从父组件传递到使用挂钩的子组件?

Reactjs 将道具从父组件传递到使用挂钩的子组件?,reactjs,react-hooks,Reactjs,React Hooks,我是一个初学者,很难理解 我有一个子组件“RadioButtonsGroup”,它使用挂钩(由MUI构建): 功能RadioButtonsGroup(){ const[value,setValue]=React.useState('isAgent'); 函数句柄更改(事件){ 设置值(event.target.value); } 返回( 标签放置开始 ); } 如何将道具从其父级传递给“RadioButtonsGroup.js”? 我试着用 <RadioButtonsGroup isAg

我是一个初学者,很难理解

我有一个子组件“RadioButtonsGroup”,它使用挂钩(由MUI构建):

功能RadioButtonsGroup(){
const[value,setValue]=React.useState('isAgent');
函数句柄更改(事件){
设置值(event.target.value);
}
返回(
标签放置开始
);
}
如何将道具从其父级传递给“RadioButtonsGroup.js”? 我试着用

<RadioButtonsGroup isAgent={false} />


但似乎并没有这个.props.isAgent传递给孩子,而根本并没有这个.props

函数组件在此
上没有其道具,而是将
道具作为函数的第一个参数

function RadioButtonsGroup(props) {
  const { isAgent } = props;

  // ...
}

道具
像-

function RadioButtonsGroup(props) {
}

function RadioButtonsGroup(props) {
}
const RadioButtonsGroup = props => {
}

export default RadioButtonsGroup;