10 Matching Annotations
  1. Jul 2024
    1. After your component is removed from the DOM, React will run your cleanup function
      • the 'cleanup function' is the return of setup .
      • 'cleanup函数'是setup返回的。
  2. Jun 2024
    1. cause the chat to re-connect every time the component re-renders

      because, before, it was depending on only 'roomId' and 'serverUrl', if they didn't change, it will not re-connect. but now, when 'onReceiveMessage' function is included in the dependency array, it will re-connect when re-rendered, because it's a new function every time.

  3. May 2024
    1. automatically calls

      wow. so if the grantType is authorization code flow type, this parseFromUrl() function actually automatically does an entire extra step which is the POST to get the token.

    2. same channel

      here's the key difference to implicit flow. the token and other info properties are return as the response of the POST request.

    3. which malicious browser extensions would not have access to

      according to the next paragraph, at least in this example case of okta, we don't need manual access to the random secret generated by frontend code.

    1. match
      • types of these fields must also match, e.g., it will be removed if you provide a number to the code field.
      • 这些属性的类型也必须匹配,如果你给的code是一个number类型,它也会被筛掉。

      @github.com/mj2068

    1. But, we can also make immutable copies like before if we want to
      • so, because of Immer, we can 'mutate' states directly. but we can also return state as well.
      • 有了Immer,可以直接在reducer里改state,也可以return state。
    1. to respond and update its own state in response to other action types besides the types it has generated
      • this is why extraReducers exists.
      • 为什么extraReducers存在的原因。