question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Investigate adding a proxy-based selector API

See original GitHub issue

Both our connect and useSelector APIs rely on the user manually specifying what pieces of state to extract to determine re-renders.

@dai-shi has done some amazing work with using ES6 Proxies to manage tracking the pieces of state that are actually needed by a component, particularly in his https://github.com/dai-shi/reactive-react-redux library.

I’ve said several times that I kinda see that lib as a sort of alpha test for whether an approach like that should be added to React-Redux itself. Now that our hooks API has been stable for a while, it might be time to start discussing that idea more seriously.

This may also have some relevance to the Concurrent Mode questions over in #1351 .

Ideally, anything we add would be completely tree-shakeable by default, so that it doesn’t increase bundle size unless the API is actually used.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:19 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
timdorrcommented, Jan 23, 2020

FWIW, we decided against the useReduxState name early on in the planning process for hooks.

1reaction
theKasheycommented, Jan 23, 2020

Ideally useTrackedState should also report an “illegal” uses, when to many entities are being tracked. Personally, for the last year, I am using tracked selectors mostly to “prove” than my manual selectors are working correctly, and will continue doing it correctly and performant(!) without tracking as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create and deploy a new API proxy | Apigee X
In the hybrid UI, select Develop > API Proxies. · Click on the "myproxy" proxy. · In the Revision column, expand the drop-down...
Read more >
Understanding APIs and API proxies | Apigee Edge
What is an API proxy? You expose APIs on Apigee Edge by implementing API proxies. API proxies decouple the app-facing API from your...
Read more >
Java Networking and Proxies
As we can see, ProxySelector is an abstract class with 2 static methods to set, or get, the default implementation, and 2 instance...
Read more >
Debug Services
The default implementation of Services, and the one used on most clusters, is kube-proxy. This is a program that runs on every node...
Read more >
Configuring Cloud Proxies in vRealize Operations
Allow outgoing traffic from the endpoints to cloud proxy over 443, 4505, and 4506. Add a vCenter cloud account and provide an account...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found