Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Too many options causes extreme lag #10

Open
zekedroid opened this issue Apr 25, 2016 · 3 comments
Open

Too many options causes extreme lag #10

zekedroid opened this issue Apr 25, 2016 · 3 comments

Comments

@zekedroid
Copy link

Is there a way to set an initial "expandedNodes" prop to false so that it won't try and render the entire state tree? We sometimes load large json structures that we don't care to look at yet the monitor will try and render, causing it to slow down to a crawl and making the tool unusable :(

@cchamberlain
Copy link
Contributor

I think the typical way to do what you're asking is passing a selector function to filter only the part of state you care about. From the options table.

image

For example, if you wanted to only show user data and errors from your state and exclude your api data you should be able to do something like:

<ChartMonitor select={ ({ api, user, errors }) => ({ user, errors }) } />

@zekedroid
Copy link
Author

Perfect :D thanks

@cchamberlain
Copy link
Contributor

NP! ✌️

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants