@kiraemclean we forked re-frame as freerange to support devcards: https://github.com/nextjournal/freerange/blob/master/docs/architecture_decision_log.org#004-we-add-a-react-context-based-api-for-providing-the-current-frame
Freerange is a few versions behind the latest Re-frame. Are there any plans to merge upstream changes from more recent versions of Re-frame?
fwiw, I would be happy to contribute to either helping keep Freerange in sync with the latest Re-frame, or figuring out how to get the changes in Freerange merged upstream. There has been an open issue on this for ~5 years, and it would seem that no conclusively better ideas have emerged in that time.
what’s changed in re-frame since then? I see mostly doc changes?
https://github.com/day8/re-frame/issues/137#issuecomment-623966169
I came across this is my searches.. looks really interesting, thanks!
@mkvlr Re-frame 1.2.0 has Reagent 1.0 as a dependency rather than 0.9.1, which makes working with React function components easier.
@rob.knight ah yeah, was there any code changes related to that? Happy to bring them in. Currently I think https://github.com/nextjournal/freerange/issues/11 is blocking external consumers but I’ve been meaning to fix that anyway
No, just a deps bump. It's only an issue for me as I care about Reagent 1.0 vs 0.9.
https://github.com/day8/re-frame/issues/137 is the relevant re-frame issue
https://github.com/day8/re-frame/issues/137#issuecomment-623944373
Hi im building a re-frame app based on this template -> https://github.com/day8/re-frame-template
One of the things I want to do is use http params. so for example I would like to use https://my-cool-app.com/home#?data=foo and get access to "data=foo" in the function that renders the /home url. Any pointers to code that does this?
(ahh the url was supposed to be an example, not an actual place....)
No clue about the template, but I'm using kee-frame for URL routing. It doesn't do it itself, it's just a wrapper, but it's a convenient one, and it does a few other things.
BTW no need to use #
in URLs in modern browsers - then can handle URL query changes without dispatching any requests.
oh sweet. yeah the template uses bidi for routing.
Hi. I found some beautiful effects based on javascript. I started to implement them in pure clojurescript manipulating the dom objects. After some iterations, I started to rewrite all of them in reframe, listening to events. Now i have a doubt. In the db I have keys for domain data and some for ui. Maybe a bad separation of concern? How do you do ?
Define what exactly the state of your app is, as a whole. Go from there.
app-db
is not about domain data. It's about your app's state.
How you separate the domain data from the UI data is up to you. May be as simple as structuring your app-db
as
{:data {...}
:ui {...}}
Ok. Very clear. Thx