【发布时间】:2020-09-30 14:04:00
【问题描述】:
这是 react.js 中的示例:
Form.jsx
<FormInput
type='text'
name='displayName'
value={displayName}
onChange={this.handleChange}
required
/>
Input.jsx
const FormInput = ({ handleChange, ...otherProps }) => (
<input className="form-input" onChange={handleChange} {...otherProps} />
)
我的问题是,我怎样才能将属性传递给具有扩展对象的其他组件?比如 react.js
【问题讨论】:
标签: javascript reactjs vue.js components