An open API service indexing awesome lists of open source software.

https://github.com/pez/clojurescript-reactive-spa-scroll-restore-example

A scroll restore recipe for history navigation scroll restoration in cljs reactive web apps
https://github.com/pez/clojurescript-reactive-spa-scroll-restore-example

Last synced: 10 months ago
JSON representation

A scroll restore recipe for history navigation scroll restoration in cljs reactive web apps

Awesome Lists containing this project

README

          

= Example project: Reagent client side routing and scroll restore with Bidi and Accountant

A simple example trying to demonstrate a way to do client side routing including scroll restore on history navigation.
https://github.com/juxt/bidi[Bidi] and https://github.com/venantius/accountant[Accountant] in https://reagent-project.github.io/[Reagent] projects.

The routing parts of this example are elaborated on in https://pez.github.io/2016/03/01/Reagent-clientside-routing-with-Bidi-and-Accountant.html[this blog post].

## Setup

The project is configured to support an interactive development
workflow using https://github.com/bhauman/lein-figwheel[Figwheel]. To start the example run:

$ lein repl

wait for the `scroll-restore.user` name space to load and then issue:

scroll-restore.user> (start)

Open your browser at http://localhost:3449/[localhost:3449]. You will
have Figwheel's magic enabled.

If you are using Emacs you can start the repl using `cider-jack-in` and enjoy
a CIDER enabled development workflow. (This is extra handy for when you are learning
how to set up Bidi routing tables.)

If you use VS Code I recommend installing https://marketplace.visualstudio.com/items?itemName=cospaia.clojure4vscode[Calva], which will bring you some of the Emacs Cider experience. (Yes, I am biased, I am the publisher of Calva.)

## License

Use however you want, at your own risk.