pqina / flip

⏳ The online version of the classic flip clock
https://pqina.nl/flip/
MIT License
874 stars 89 forks source link

hiding component in react causes error #40

Closed mr-zwets closed 2 years ago

mr-zwets commented 2 years ago

Optionally hiding the Flip component in react with ternary operator causes a "NotFoundError: Node.removeChild: The node to be removed is not a child of this node". This is because of the Tick.DOM.destroy(this._tickRef.current); in componentWillUnmount().

Is there any workaround for this? I like the way this flip counter looks a lot and I'd hate to have to replace is by something else just to fix this.

mr-zwets commented 2 years ago

solution of PR #15 worked! (https://github.com/pqina/flip/issues/15#issuecomment-667967389)