You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
(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.
The text was updated successfully, but these errors were encountered: