sumakokima2 / resium-sample2

0 stars 0 forks source link

メモ #7

Open sumakokima2 opened 5 years ago

sumakokima2 commented 5 years ago

手順

 - earth.tsx

・Stateでピンの表示非表示配列を作成

interface State { pinsshow: boolean[]; imagesshow: boolean[]; pinsboolean:boolean; }

・コンストラクタ

constructor(props: Props){ super(props); this.state = { pinsshow: [true,true], ←初期値を入力 }; this.clickAction = this.clickAction.bind(this); }

・render

return (

{this.props.pins.map((d, i) => { return ( ); })} ``` ・pin.tsx ``` return ( ); ``` *** #### 詰まったところ **lonとlatのnumber設定** parseFloat()`を入れないとエラー *** #### 課題 なし