<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>surfi8000</author_name>
  <author_url>https://blog.hatena.ne.jp/surfi8000/</author_url>
  <blog_title>調べたことをまとめるブログ</blog_title>
  <blog_url>https://corycory.hateblo.jp/</blog_url>
  <categories>
    <anon>JavaScript</anon>
    <anon>React</anon>
  </categories>
  <description>はじめに 今回はReactのstateについてメモ。setState()でstateの値を更新し、同期的に取得する方法を書いていきます。 結論 ↓のようにすると、同期的にstateの値を更新/取得することができます。 import React, { Component } from 'react'; class App extends Component { constructor(props) { super(props); // 初期化 this.state = { num: 0, multipled: 0, }; console.log('初期値: ' + this.state.num)…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcorycory.hateblo.jp%2Fentry%2Fjavascript%2Freact-setstate-callback%2F&quot; title=&quot;React - stateの値を同期的に更新 - 調べたことをまとめるブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://morelia.tokyo/wp-content/uploads/2020/05/ezgif-1-d2f661579d51.gif</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-05-01 13:34:32</published>
  <title>React - stateの値を同期的に更新</title>
  <type>rich</type>
  <url>https://corycory.hateblo.jp/entry/javascript/react-setstate-callback/</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
