Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component not mounted again on route change in choo #22

Open
dbtek opened this issue Jun 14, 2017 · 4 comments
Open

Component not mounted again on route change in choo #22

dbtek opened this issue Jun 14, 2017 · 4 comments

Comments

@dbtek
Copy link

dbtek commented Jun 14, 2017

I am experimenting microcomponent with choo. Not sure whether I am missing something or not. However, a component inside a route is not visible after one or more route changes.

Reproduce

  • Gist
  • Change route to /about
  • Change route back to /
  • Component is gone
@rafaismyname
Copy link

hey @yoshuawuyts, sorry to bother... but any suggestions on this?

best!

@rafaismyname
Copy link

@dbtek seems like an issue with nanocomponent...
When a new view is rendered, nanocomponent's _element is not being unloaded causing nanomorph to not rerender the component itself...

a "hotfix" for this, (that worked for me, by now...) would be:

function createComponent () {
  var component = microcomponent({
    name: 'plaincomponent'
  })
[...]
  function unload () {
    this._element = null;
  }
}

best

@dbtek
Copy link
Author

dbtek commented Jul 19, 2017

@RafaelAmorim Thanks for workaround. I'll try it!

@yoshuawuyts
Copy link
Owner

yoshuawuyts commented Jul 19, 2017 via email

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

No branches or pull requests

3 participants