Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reagent/fe-frame examples break the reload-on-save #713

Open
farcaller opened this issue Dec 19, 2024 · 0 comments
Open

Reagent/fe-frame examples break the reload-on-save #713

farcaller opened this issue Dec 19, 2024 · 0 comments

Comments

@farcaller
Copy link

(via slack)

The re-frame example stores the route inside re-frame's db. The reagent example stores the same in an ratom. This creates a problem, where, given the routes structure, you will store the whole route including the actual view function (e.g.). In turn, this creates a problem if you reload this function in the repl, because its actually referred from the state, meaning the wrong version of the function will be executed 9and it might further corrupt the state).

One option would be to store the Var in the route (e.g. #'home-page for the example above) and then deref it in the route render function, but it was advised against too in the slack.

What'd be the most safe way to store the route in the state management so that it doesn't refer to anything but the route data itself? I don't mind sending a follow up PR to fix the examples, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants