Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: bug in componentDidUpdate in base.tsx causing unnecessary rerenders #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
kagawagao merged 2 commits into open-data-plan:master from jaylmiller:master
Mar 27, 2020

Conversation

@jaylmiller
Copy link
Contributor

@jaylmiller jaylmiller commented Mar 27, 2020

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.

Copy link

vercel bot commented Mar 27, 2020
edited
Loading

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
Copy link
Member

kagawagao commented Apr 1, 2020
edited
Loading

@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

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

Reviewers

@kagawagao kagawagao kagawagao requested changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /