// Make a signal that can store the map inside the reactive system..
// The map has to _live_ for it to be able track its handlers and stuff!
let map_store = create_rw_signal(None);
---
map_store.set(Some(map));
Since the map stores all the handlers, stuff like adding closure to run on anything don't work.. since they get dropped right away with the map. This resolves those issues that potential users (like me) might encounter!
Without this snippet Leptos drops the map:
Since the
map
stores all the handlers, stuff like adding closure to runon
anything don't work.. since they get dropped right away with themap
. This resolves those issues that potential users (like me) might encounter!