Skip to content
Discussion options

You must be logged in to vote

Ok I see what you mean. That hook (among other things) works because RQB uses Redux internally to manage state. This works well when QueryBuilder is used as an uncontrolled component. If you use it as a controlled component—by updating the query prop—it will see that the new query prop is different from what's in the Redux store during the render due to the prop change and then dispatch an action to sync the Redux store with the prop, causing another render.

But really, two renders with the same props shouldn't cause any performance issues unless you have some separate, underlying issue.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@instagibb
Comment options

@jakeboone02
Comment options

@instagibb
Comment options

@jakeboone02
Comment options

Answer selected by instagibb
@jakeboone02
Comment options

@instagibb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants