動くコード図鑑技術記事現場の渡り方キャリア論すべての記事About
TypeScript

ContainerのMapstateの部分でどのような値が来てるか見てみる。

出典: Typescript×ReduxでStateがundefinedに?確認すること!ContainerのMapstateの部分でどのような値が来てるか見てみる。

ContainerのMapstateの部分でどのような値が来てるか見てみる。 (typescript)#41a6cb2ed6b9
	render() {
		return (
			<div>
				<p>CurrentCount:{this.props.value.num}</p>
				{console.log(this.props)}
				<button type={"button"} onClick={() => this.props.actions.Increment()}>Increment</button>
				<button type={"button"} onClick={() => this.props.actions.Decrement()}>Increment</button>
			</div>
		)
	}
▸ 実行ボタンで結果を表示
  • id: #41a6cb2ed6b9
  • lines: 10
  • extracted: 2026-06-10
  • captured: 2026-06-10

Source収録記事

この snippet は記事の「ContainerのMapstateの部分でどのような値が来てるか見てみる。」セクションに登場する。コードの前後の文脈・ハマりどころの解説は記事本文で。

同じ記事から

12
図鑑トップ