私の頭を反応させようとしています。私は、入力フィールドからデータを取り出し、変数(let)に渡して、別の文字列でhtmlに渡すことができます。これは「双方向の拘束力」でしょうか?誰かがこの作業の簡単な例を持っていますか?投稿しないで入力フィールドから変数にデータを渡す
http://codepen.io/IanHazelton/pen/ygEomV?editors=0110
let name="{name from input}";
let age="{age from input}";
class App extends React.Component {
render() {
return (
<div className ="wrap">
<h1 className="string">What's your name?</h1>
<input type="text" id="name" />
<h1 className="string">How old are you?</h1>
<input type="text" id="age" />
<h1 className="string">Hi {name}! How are you today? You're {age} years old.</h1>
</div>
)
}
}
ReactDOM.render(<App/>, document.getElementById('Root'))
Works!フレンドリーで有益で効果的な返信をありがとう! – chilledMonkeyBrain