kabisa / maji

Maji is a framework to build great hybrid mobile apps.
https://www.majimobile.com/
MIT License
18 stars 10 forks source link

Page Transition doesn't account for rendering the same component #183

Closed leonderijke closed 6 years ago

leonderijke commented 6 years ago

Given this route: <TestPage path="/test/:foo?" />, when transitioning from /test/ to /test/bar (and vice versa) a transition is prevented. This causes TestPage to render with an empty foo param.

The reason for this is that the state of the PageContainer will only be updated when rendering different components (the check is currently nextPage.nodeName !== previousPage.nodeName). The state will not be updated when rendering the same component with different props.

ruisalgado commented 6 years ago

@leonderijke can u give #184 a go? should solve this

leonderijke commented 6 years ago

Yes, #184 fixes this problem!

leonderijke commented 6 years ago

Since #184 is merged, I'm closing this issue.