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

[question] with-reasonml example causes full page reload on link click #4028

Closed
1 task done
egorovli opened this issue Mar 19, 2018 · 0 comments · Fixed by #4214
Closed
1 task done

[question] with-reasonml example causes full page reload on link click #4028

egorovli opened this issue Mar 19, 2018 · 0 comments · Fixed by #4214

Comments

@egorovli
Copy link

egorovli commented Mar 19, 2018

Hi. I'm kind of new to ReasonML and wanted to start it with Next.js. After trying to reproduce the with-reasonml example I've noticed that each time a link is clicked, the page is reloaded (like on a regular site with server generated content), which defeats the whole purpose of a single-page app.

Besides, docs for the example say:

An app with two pages which has a common Counter component. That Counter component maintain the counter inside its module. This is used primarily to illustrate that modules get initialized once and their state variables persist in runtime.

And hence I presume that it is not the expected behavior.

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Links are followed SPA-style, without the full page refresh.

Current Behavior

reasonml2

Steps to Reproduce

  1. $ yarn create next-app --example with-reasonml with-reasonml-app
  2. $ cd with-reasonml-app
  3. $ yarn build && yarn start

Your Environment

Tech Version
next 5.0.0
node 9.2.0
OS macOS 10.13.3
browser any, basically
bs-platform 2.2.3
babel-plugin-bucklescript 0.3.1
reason-react 0.3.4
@egorovli egorovli changed the title [quetion] with-reasonml example causes full page reload on link click [question] with-reasonml example causes full page reload on link click Mar 19, 2018
rase- pushed a commit to rase-/next.js that referenced this issue Apr 26, 2018
rase- pushed a commit to rase-/next.js that referenced this issue Apr 26, 2018
lependu pushed a commit to lependu/next.js that referenced this issue Jun 19, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant