LoginSignup
1
0

More than 3 years have passed since last update.

【React】JSX内での関数の書き方

Last updated at Posted at 2019-06-20

備忘録として残します。

■やり方

{(()=>{処理内容})()}です。


render() {
  {/* <select value={this.state.selectvalue}> */}


    {/* START FUNCTION */}
      {(()=>{
          // let options = [];
          // let code =  this.state.code
          // for(var i in code){
          //     options.push(<option value={i}>{code[i]}</option>);
          // }
          // return options;
      })()}
    {/* END FUNCTION */}


  {/* </select> */}
}
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0