Skip to content

Conversation

@jaylmiller
Copy link
Contributor

Hi great job writing this wrapper lib, its been super useful for me and my company. I fixed a bug that was causing an annoying visual bug where the plots would re-render when a parent component did, even when none of plot component's props were updated.

@vercel
Copy link

vercel bot commented Mar 27, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/opd/g2plot-react/78dffb2ff
✅ Preview: https://g2plot-react-git-fork-jaym910-master.opd.now.sh

@jaylmiller jaylmiller changed the title fix bug in componentDidUpdate in base.tsx causing unnecessary rerenders fix: bug in componentDidUpdate in base.tsx causing unnecessary rerenders Mar 27, 2020
@kagawagao kagawagao merged commit 78370fa into open-data-plan:master Mar 27, 2020
@kagawagao
Copy link
Member

kagawagao commented Apr 1, 2020

@jaym910 I'd have to revert this commit, thanks your contribution

if we filter function properties in config, chart will not be updated when events changed.

you can reproduce this bug in latet test case in line.spec.tsx

you should use other way like useMemo/useCallback/useRef to persist you config to avoid unnecessary rerenders

@jaylmiller
Copy link
Contributor Author

Ok, sorry I didn't think of that scenario. And thanks for the tip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants