malte-wessel/react-textfit

Doesn't work with multiple components

Closed this issue · 2 comments

I have two components loaded into the same Container (page).
The first component (top of the page) seems to work.
However, the second doesn't seem to detect componentDidUpdate.

It looks like it is something to do with the ready state not being set.
i.e. The second component process didn't get the initial call, thus the ready state never set to true.

It works when I comment out

//var ready = this.state.ready;
//if (!ready) return;

from the componentDidUpdate function.

I need this fix ASAP, please let me know if there's a quick solution or workaround to this.

Thank you in advance

Thank you for the report. It will help us if you show a demo of what you mean by “two components loaded into the same Container (page)” Preferably using a jsfiddle.net or something similar.

Note that in the demo we have many components on the same page and they seem to work fine.

If you have new findings, by all means, feel free to add them here and the issue might be reopened.