<Modal/> can not work with Next@2.0.0 Router #8

Huxpro opened this Issue Jan 7, 2017 · 1 comment


None yet

2 participants

Huxpro commented Jan 7, 2017 edited

Hey Im going to help migrating nextgram to next@2.0.0 since it's a little bit outdated and unmatch today's README of next.js. While migrating next/css to styled-jsx goes well, I found <Model/> no more works.

In current nextgram with next@1.*, when this.props.url.push('/photo?id=' + id) is called, the <Index/> (a.k.a pages/index) is "kept" and just do a re-rendering thus we can see <Model/> shows upon <Index/>.

However, with next@2.*, whatever router.push() or <Link/> is used, the <Index/> would be directly replaced with <Photo/> (a.k.a pages/index). This behaviour can be observed both in DOM or React Devtool.

It seems that the router in next@1.* behaves more "React way" and more "correct" in terms of the power we want to take from SPA and client-side routing such as Transition, Perf and Capability to render differently in different scenarios.

Maybe it's better to open a issue at next.js?

nkzawa commented Jan 13, 2017

Closed via #9

@nkzawa nkzawa closed this Jan 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment