thomasboyt / react-pikaday

A React component wrapper around Pikaday
111 stars 31 forks source link

Why does the DOM element not get destroyed? #27

Open nosplashurinal opened 6 years ago

nosplashurinal commented 6 years ago

When I navigate to a route where I've used a react-pikaday component, I get a DOM element with classname pika-single is-hidden is-bound at the end of <body>. When I navigate outside that route, I expect that the react-pikaday DOM element will be destroyed. But it does not get destroyed. Due to this behavior, say if I visit that route again, I get another DOM element at the end of my <body>. Essentially, if I move in and out of this route, I end up with a whole bunch of pikaday DOM elements at the end of my body. Is this expected behavior?