Fork me on GitHub
#re-frame
<
2020-04-30
>
mikethompson02:04:05

@pattruong Perhaps you could use re-frame-template to create a simple app. That will supply you with a known-good formulation. And then compare what it generates with what you have - look for the differences.

👍 4
Franklin16:04:40

what is the best way to achieve the kind of routing implemented by react-router where when you click a link on any page, the browser does not perform a reload? I was thinking a potential way of doing this is creating a reagent component that encapsulates a HTML `<a>` tag that receives click events but calls  `(. e preventDefault)` on them. Does anyone here have thoughts on this?

Franklin17:04:34

Just Found out that accountant is meant for this exact thing

lukasz16:04:37

Learn Re-Frame covers that - https://www.learnreframe.com - I think there's a free version as well

Patrick Truong18:04:35

Hello everyone, I’m new to re-frame and I was wondering if it’s possible to edit your app-db in REPL for testing purposes? I have a basic app-db that looks like this: {:color "blue" :message "I'm the default message"} Here are the steps that led me into some trouble: 1. I navigated to this namespace in my REPL: (in-ns 're-frame.db) and inspected app-db which gave me the correct atom. 2. I then did a test to see if I could change my color to "red" which seemed to be correct with (assoc @app-db :color "red") (returned {:color "red", :message "I'm the default message"}). 3. So I then did a swap command: (swap! app-db (assoc @app-db :color "red")), but then got nil as a result. Can someone point out where I went wrong in my logic above? Much appreciated 🙂

mccraigmccraig19:04:38

@pattruong you are calling swap! wrong... try (swap! app-db assoc :color "red") ... (which i haven't verified myself, cos I'm afk)

Patrick Truong21:04:44

@mccraigmccraig thanks! That worked 🙂