Fork me on GitHub
#re-frame
<
2022-11-01
>
Ivan Fedorov18:11:09

is it legal to call subscriptions in coeffects?

p-himik19:11:52

Sir, this is re-frame police. Calling subscriptions in coeffects is illegal, and doing so will result in a severe action by the way of issuing a warning in the JS console.

🚨 3
🚓 2
Ivan Fedorov19:11:41

that’s what I said!

Ivan Fedorov23:11:50

I’m helping a friend whose app stores everything in firebase and reads things via re-frame/firebase. In order to handle an event he subscribes to the needed subs in a view, then, when a user clicks – sends this data to the handler. I’m trying to understand, what could be a way out of this. I think he got used to re-frame/firebase supplying all data as a sub. But then started to use it for the things it wasn’t meant for. I would love to transition to a state of the app where I would load needed data based on the route. This means that either I need to omit the re-frame adapter and query Firebase myself, or that I should use the adapter as a query tool and also an event source to update the local state on Firebase changes.

Ivan Fedorov23:11:44

cc @U3JJ35GUT, sir, perhaps you can offer an advice about using your adapter to populate the DB and keep it up to date? Rather than supplying only the subscriptions layer.