Fork me on GitHub
#re-frame
<
2020-11-02
>
Ivan Fedorov12:11:05

Putting it simply: do you ever use subscriptions to then put something back to the app-db?

lukas.rychtecky14:11:21

IMO you shouldn’t. Subs are “views” above the data. Only event handlers should change the app-db.

isak15:11:55

No, that is what interceptors are for. See the built-in on-changes interceptor, for example.

Ivan Fedorov19:11:24

@U08JKUHA9 good tip, thanks a lot! However, this doesn’t use awesome caching things like subs [supposedly] do.

✔️ 1
Ivan Fedorov19:11:25

@U6HHQ05GB Thanks! Yeah, I’m hesitant also, but still – I don’t see negative scenarios yet. Apart from “shooting myself in the foot”. I agree that it’s an anti-pattern, for sure.

👍 1