blog.axlight.com/posts/what-is-state-usage-tracking-a-novel-approach-to-intuitive-and-performant-api-with-react-hooks-and-proxy

Preview meta tags from the blog.axlight.com website.

Linked Hostnames

8

Thumbnail

Search Engine Appearance

Google

https://blog.axlight.com/posts/what-is-state-usage-tracking-a-novel-approach-to-intuitive-and-performant-api-with-react-hooks-and-proxy

What is state usage tracking? A novel approach to intuitive and performant global state with React hooks and Proxy

Introduction There are many libraries for global state with React hooks. React Redux also provides hooks API, which is very clean. In general, I would avoid using global state. It would reduce the isolation of components. Multiple contexts should work fine for certain use cases. But, what if we really need a global state. Problem When a state is a non-trivial object, it’s not likely to use all properties of the object for one component to render.
What most libraries do is to provide a selector interface. With the selector interface, developers can specify which part of the state to use in a component. In general, a selector is a function, but there are alternative ways to specify part of the state. For example, by property names or paths. In any case, developers are responsible to write proper selectors.




Bing

What is state usage tracking? A novel approach to intuitive and performant global state with React hooks and Proxy

https://blog.axlight.com/posts/what-is-state-usage-tracking-a-novel-approach-to-intuitive-and-performant-api-with-react-hooks-and-proxy

Introduction There are many libraries for global state with React hooks. React Redux also provides hooks API, which is very clean. In general, I would avoid using global state. It would reduce the isolation of components. Multiple contexts should work fine for certain use cases. But, what if we really need a global state. Problem When a state is a non-trivial object, it’s not likely to use all properties of the object for one component to render.
What most libraries do is to provide a selector interface. With the selector interface, developers can specify which part of the state to use in a component. In general, a selector is a function, but there are alternative ways to specify part of the state. For example, by property names or paths. In any case, developers are responsible to write proper selectors.




DuckDuckGo

https://blog.axlight.com/posts/what-is-state-usage-tracking-a-novel-approach-to-intuitive-and-performant-api-with-react-hooks-and-proxy

What is state usage tracking? A novel approach to intuitive and performant global state with React hooks and Proxy

Introduction There are many libraries for global state with React hooks. React Redux also provides hooks API, which is very clean. In general, I would avoid using global state. It would reduce the isolation of components. Multiple contexts should work fine for certain use cases. But, what if we really need a global state. Problem When a state is a non-trivial object, it’s not likely to use all properties of the object for one component to render.
What most libraries do is to provide a selector interface. With the selector interface, developers can specify which part of the state to use in a component. In general, a selector is a function, but there are alternative ways to specify part of the state. For example, by property names or paths. In any case, developers are responsible to write proper selectors.


  • General Meta Tags

    13
    • title
      What is state usage tracking? A novel approach to intuitive and performant global state with React hooks and Proxy · Daishi Kato's blog
    • content-type
      text/html; charset=utf-8
    • viewport
      width=device-width, initial-scale=1.0, maximum-scale=1
    • description
    • article:section
      posts
  • Open Graph Meta Tags

    7
    • og:url
      https://blog.axlight.com/posts/what-is-state-usage-tracking-a-novel-approach-to-intuitive-and-performant-api-with-react-hooks-and-proxy/
    • og:site_name
      Daishi Kato's blog
    • og:title
      What is state usage tracking? A novel approach to intuitive and performant global state with React hooks and Proxy
    • og:description
      Introduction There are many libraries for global state with React hooks. React Redux also provides hooks API, which is very clean. In general, I would avoid using global state. It would reduce the isolation of components. Multiple contexts should work fine for certain use cases. But, what if we really need a global state. Problem When a state is a non-trivial object, it’s not likely to use all properties of the object for one component to render.
What most libraries do is to provide a selector interface. With the selector interface, developers can specify which part of the state to use in a component. In general, a selector is a function, but there are alternative ways to specify part of the state. For example, by property names or paths. In any case, developers are responsible to write proper selectors.

    • US country flagog:locale
      en_us
  • Twitter Meta Tags

    4
    • twitter:card
      summary_large_image
    • twitter:image
      https://blog.axlight.com/posts/what-is-state-usage-tracking-a-novel-approach-to-intuitive-and-performant-api-with-react-hooks-and-proxy/cover.jpg
    • twitter:title
      What is state usage tracking? A novel approach to intuitive and performant global state with React hooks and Proxy
    • twitter:description
      Introduction There are many libraries for global state with React hooks. React Redux also provides hooks API, which is very clean. In general, I would avoid using global state. It would reduce the isolation of components. Multiple contexts should work fine for certain use cases. But, what if we really need a global state. Problem When a state is a non-trivial object, it’s not likely to use all properties of the object for one component to render.
What most libraries do is to provide a selector interface. With the selector interface, developers can specify which part of the state to use in a component. In general, a selector is a function, but there are alternative ways to specify part of the state. For example, by property names or paths. In any case, developers are responsible to write proper selectors.

  • Link Tags

    3
    • stylesheet
      //cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css
    • stylesheet
      https://blog.axlight.com/css/style.css
    • stylesheet
      /css/custom.css

Links

13