Closed dearlordylord closed 9 years ago
Important thing to add: template really being destroyed - I got log in Template.teacherSelect.destroyed
call. So issue should be rephrased into component isn't being destroyed after template is destroyed
Also when I check my template.onRendered this way:
... onRendered(function() {
var template = this;
setTimeout(function(){
console.warn(template)
}, 3000)
})
It shows that firstNode and lastNode of template are still span
(!)
UPD what I do for now is template._reactComponent = React.render(component, template.firstNode);
in onRender manually, then React.unmountComponentAtNode(template._reactComponent.getDOMNode());
in onDestroyed.
I created a pull request for the issue, will use the fork until it is resolved in master.
Thank you @Firfi
I have route like this
this.route('teacherSelect', {path: '/teacherSelect', controller: TeacherSelectController});
and a component defined like component in this project example.
When I visit /teacherSelect page, I get component rendered. When I go to another page by any link (placed in iron-router layout inside what component is rendered), new template being rendered, but old one with component still linger on page! : ) Important thing may be that these other templates aren't react-enabled and use Blaze as I introduce this in existing project.