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
- Host: GitHub
- URL: https://github.com/pez/clojurescript-reactive-spa-scroll-restore-example
- Owner: PEZ
- Created: 2017-10-26T09:43:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-28T11:37:08.000Z (about 8 years ago)
- Last Synced: 2025-01-26T04:25:19.233Z (over 1 year ago)
- Language: Clojure
- Size: 7.81 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
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.