GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||
GeezerVison is showing github.com — fix markers rerender when click to open InfoWindow by deadkff01 · Pull Request #310 · fullstackreact/google-maps-react Conversation
|
|
@deadkff01 , I came across that issue recently. I did the same comparison but in shouldComponentUpdate method. Can I ask you why you've opted to the componentDidUpdate? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@m-bartenev, I did the comparison in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@deadkff01 , I see :) Thank you for your answer! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
To anyone who comes across this bug, here is a patch you can use until things are merged, should stop the constant re-renders: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Nice @srobertson421 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| componentDidUpdate(prevProps) { | ||
| if ((this.props.map !== prevProps.map) || | ||
| (this.props.position !== prevProps.position) || | ||
| ((this.props.position && prevProps.position) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
most unreadable, please rather use a function such as 'arePositionsEqual' to simplify readability. thank you
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ok, it's been a long time, I'll see if this change still makes sense, if so, I'll make the change later.
Thanks for the feedback.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The problem still persists in the current version of the lib.
I solved your issue in the last commits.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.