-
Notifications
You must be signed in to change notification settings - Fork 43
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
React: Fix rendering issue #109
Conversation
eb36dc9
to
e63c965
Compare
@@ -4,7 +4,7 @@ import { Graph } from '@unovis/ts' | |||
import { generateNodeLinkData, NodeDatum, LinkDatum } from '@src/utils/data' | |||
|
|||
export const title = 'Basic Graph' | |||
export const subTitle = 'Generated Data' | |||
export const subTitle = 'Select Node on Click' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rokotyan Would you mind explaining how we should be labeling title, subTitle, and category? I want to be consistent but it's not clear to me the function of each one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reb-dev I would like them to give us a better understanding of what particular example is about. I don't have a clear guidance for that yet, so it's something we'll need to crystallize over time. If you have ideas, you're more than welcome to share them!
In the particular case:
category
tells us that it's a Graph example (I think this field will almost always be related to the component name);
title
tells us that i'll be a rather basic example;
but subTitle
give us an idea that there's something extra, i.e. node selection logic.
#108
Previously, our
arePropsEqual
would only check if child props had changed for multiple children, but in the case of only one child it would always returntrue
. This prevented the re-rendering of the child component even though it had updated props.Added a new dev demo page based on #107 to reflect the change.