fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
tony.kay 2021-02-19T03:03:27.480500Z

yeah, filtering is fine if you want to code it 🙂

tony.kay 2021-02-19T03:03:51.480700Z

beware there are modes in there. Try to only affect the :runtime mode

tvaughan 2021-02-19T16:17:38.481700Z

Does the current-route! function mentioned at https://book.fulcrologic.com/#_route_segments_and_changing_routes exist? I don't see it in a github search. Thanks

hadils 2021-02-19T17:39:27.485500Z

I have a n00b question. I am working on Fulcro with React Native. I have the app rendering properly and am able to see controls.. I am successfully loading queries in to my local app db -- I can seee the data with Fulcro inspect. However, the forms on the simulator are blank and my debugging statements show that props are empty. I am sure that i missed something or am doing something wrong. Could someone point me in the right direction? Thanks in advance!

tony.kay 2021-02-19T18:04:22.485600Z

Use the source. Double-tap of shift in IntelliJ, type current-route, double tap shift again to get “include non-project items”:

tony.kay 2021-02-19T18:05:43.486Z

Or just jump to source from a require of the DR ns Or clone the repo and try git grep Or use https://cljdoc.org/d/com.fulcrologic/fulcro/3.4.17/api/com.fulcrologic.fulcro.routing.dynamic-routing (thanks to @holyjak!!! So nice)

tony.kay 2021-02-19T18:09:05.486300Z

You have to join the loaded data to your view graph. Initial data composes it all together for what is there at app startup, but if you’re loading data you use targeting to create the edge in the UI. If props are nil, here is the way to diagnose it every time: 1. Go to DB Explorer tab in Inspec 2. Find your root data node 3. Follow the graph by clicking to follow your data graph in the same way your UI joins the target in…root through router current route through X , Y, etc. At some point you will either: Discover that your data graph isn’t connected and that you should have added :`target` to your load or merge, OR discover that you didn’t compose the query to match your data graph.

hadils 2021-02-19T18:10:21.486500Z

Thank you @tony.kay. I'm sorry to bother you.

tony.kay 2021-02-19T18:13:48.486700Z

no problem. Everyone asks this same question at some point, and it’s funny how silly simple the answer always is: Fulcro is the only lib I’m aware of where the View = F(state) in such a literal way. If the F, which is just the query, can follow the graph in state, which it does literally by walking idents, then you’ll get the right props. The one additional screw-up is if you don’t pull the props out and pass them to the child. That’s also a possible thing to look at, but much rarer mistake since the defsc macro tries to error-check your destructuring of props for typos (because it was a common error that we could detect and help with)

tvaughan 2021-02-19T18:23:43.487Z

Thanks @tony.kay However, I'm asking about:

Additional useful functions are:

(current-route! component-or-app starting-component)
Returns a vector of the path components on the current (live) route starting at the given starting-component. If you use your root component it will be the absolute path, and using some other component router will give the relative path from there.

tvaughan 2021-02-19T18:27:12.487200Z

Note the trailing !

tony.kay 2021-02-19T18:43:28.487400Z

yes, that doc is incorrect

1đź‘Ť
Jakub HolĂ˝ 2021-02-19T21:29:55.488900Z

Thanks to my awesome mentees, I am starting a new series, "Fulcro Gotchas". The beginning is here: https://gist.github.com/holyjak/5bad02dc378fe57b3111edab42b4adbc If you have some pitfalls and misconceptions of your own that you would like help others to avoid, let me know!

3❤️
Jakub HolĂ˝ 2021-02-20T13:19:46.005900Z

Thank you, Tony! Updated.