ml-in-barcelona / jsoo-react

js_of_ocaml bindings for ReactJS. Based on ReasonReact.
https://ml-in-barcelona.github.io/jsoo-react
MIT License
138 stars 19 forks source link

Example doesn't work without server (in Chrome) #32

Closed naartjie closed 3 years ago

naartjie commented 4 years ago

Hi @jchavarri, thanks for starting this great project. Exciting stuff!!

Running the example without the server (using Chrome), something is failing with the router / pushState:

Screenshot 2019-10-13 at 21 50 56

Running the server works fine.

jchavarri commented 4 years ago

Hi @naartjie , thanks for the kind words :)

history functions don't work when opening an html local file with file://, and because reason-react and thus jsoo-react rely on history.pushState, the examples can't work without a local server.

I will keep this issue open as a reminder to update the readme. :)

jchavarri commented 3 years ago

The readme now mentions that it's required to start a server to run the example:

https://github.com/jchavarri/jsoo-react/blob/94e7d95d545fc21550ff9358a147818d53389c6b/README.md#L41-L42