Hello, Is there a way to dispatch reframe events from Javascript functions in the webpage? I would like to migrate to reframe an app I made that uses google maps. When you click on a markup in gmaps a javascript event function handler is called. I would like to know if there is a way to dispatch a reframe event from theses javascript functions. Thank you
You could write the handler in ClojureScript and export it.
Wrap re-frame.core/dispatch
in a function marked with ^:export
.
Can you easily construct keywords from js? And vectors? Or will js arrays work?
That wrapper can do that. And whatever else might be needed to bridge JS and re-frame.
JS arrays will not work because there's an explicit check for vector?
.
Thank you for your answer
A non related question. Has anyone worked with reframe and https://react-bootstrap.github.io/? I found some examples of integrating https://github.com/burhanloey/reagent-react-bootstrap/tree/master/src/reagent_react_bootstrap. But I was wondering, given that reframe comes with its own react (from my understanding), if it was possible to tell reframe to use react-bootsrap instead of react or if that would lead to some unwanted conflicts? Thank you
re-frame doesn't come with its own React. re-frame uses Reagent, which requires React.
And react-bootstrap
is just a library built on top of React. If you decide to use it, it will just use React that's already used in your project.
Ah ok. Thanks for clarifying @p-himik