re-frame

https://github.com/Day8/re-frame/blob/master/docs/README.md https://github.com/Day8/re-frame/blob/master/docs/External-Resources.md
7e27 2021-05-25T12:49:26.034600Z

Iā€™m having some trouble understanding how to write async coeffect-handlers (e.g. loading some data from a server)? Am I misunderstanding the intended purpose?

p-himik 2021-05-25T12:54:15.034700Z

There can be no async coeffects. But there can be async effects that load the data and put it into app-db.

7e27 2021-05-25T12:55:38.034900Z

OK, thanks:)

Joni Hiltunen 2021-05-25T20:43:15.036Z

Is it normal that when adding or changing effect handlers, everything stops working with hot code reloading until I refresh the page?

p-himik 2021-05-26T10:19:53.038500Z

Use defonce when defining history instead of def.

Joni Hiltunen 2021-05-26T10:21:18.038700Z

Amazing! Thanks. Should I submit an issue or a pull repo (not sure I know how) for the template?

p-himik 2021-05-26T10:21:18.038900Z

When your code gets hot-reloaded, the routes namespace is re-evaluated, so with (def history ...) you create a new history object each time it's re-evaluated. But you don't call start! then, so pushy ends up using a new history that hasn't been used in start!.

p-himik 2021-05-26T10:21:49.039100Z

> Should I submit an issue or a pull repo (not sure I know how) for the template? Sure! I think it makes sense. First an issue and then a PR for that issue.

Joni Hiltunen 2021-05-26T10:22:24.039300Z

should be a trivial change if I know where to find the code in the template thing šŸ˜„ thanks again

šŸ‘ 1
superstructor 2021-05-27T04:17:22.039900Z

PR merged to re-frame-template and released. Thanks for debugging/fixing the issue @p-himik @djonih :thumbsup:

p-himik 2021-05-25T20:51:29.036100Z

No.

Joni Hiltunen 2021-05-25T20:54:23.036300Z

Now I'm worried šŸ˜„ I wonder how to debug this

p-himik 2021-05-25T20:57:36.036500Z

Your problem definition is very vague so I can't really give any hints.

Joni Hiltunen 2021-05-25T21:03:52.036700Z

Hmm, actually it's just the navigation bar that stops working... rest of the app seems to function fine

Joni Hiltunen 2021-05-25T21:04:47.036900Z

I'm pretty much doing what the re-frame template does for navigating when you make the template with the option +routes

Joni Hiltunen 2021-05-25T21:05:57.037100Z

The event still shows up in the debugger view (can't remember if this was re-frisk or the other one) but nothing seems to happen... the db doesn't get updated with the new panel

p-himik 2021-05-25T21:07:43.037300Z

If you spend a significant amount of time on it without any progress, create a repo with a minimal reproducible example and with the exact steps I need to do to reproduce the issue, and I'll take a look.

Joni Hiltunen 2021-05-25T21:08:48.037500Z

hmm, alright. I'll see if it happens with a fresh from template app. Because pretty sure I'm dispatching the navigate event the same way as in the examples

Joni Hiltunen 2021-05-25T21:17:21.037700Z

@p-himik here is an explanation of the steps and a repo https://github.com/Sose/brokennav/blob/main/explanation.md

Joni Hiltunen 2021-05-25T21:17:52.038Z

I wonder if it's my system or the template or what

Joni Hiltunen 2021-05-25T21:31:25.038200Z

I tested with Chromium and Firefox and it happens in both for me