Skip to content

Conversation

@luigi-rosso
Copy link
Contributor

This is @she-who-codes's fix for the deprecated componentWillReceiveProps change from React 16.

@luigi-rosso
Copy link
Contributor Author

Hey @she-who-codes, can you fix up the conflicts?

@luigi-rosso
Copy link
Contributor Author

luigi-rosso commented Jan 23, 2020

Might be good to remove the example's build folder too, lots of huge files in there that just get built when you run the example anyway!

Copy link
Contributor Author

@luigi-rosso luigi-rosso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we just need to validate that the incoming property changes are the ones that get applied. See my comment on FlareComponent.js!

if (this.props.file !== prevProps.file)
{
this.load(nextProps.file);
this.load(prevProps.file);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this will attempt to load the previously set file. I think we want to load the incoming change (what used to be nextProps, which in this case is the this.props). Similarly below it'll try to initialze to the previous artboardName and controller.

We might want to make a test (maybe a button in your example) that changes the current file and make sure it's changing to the expected value.

You could use a second .flr file that has a cactus that's a different color or something. I'm worried that the code as it is will not change to the new file.

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.

3 participants