Fork me on GitHub
#fulcro
<
2020-04-21
>
codonnell00:04:06

Did you initialize routing?

twashing00:04:51

@codonnell I tried to change route

(dr/change-route app ["index"])
After initializing routing with
(ui-top-router router {:current-state :pending})

codonnell00:04:42

There's a function dr/initialize-routing!

codonnell00:04:10

Name might be slightly different, but something like that. On my phone so hard to check.

twashing00:04:47

Checking now…

codonnell00:04:12

I wrote a blog post about setting up routing, might help. https://chrisodonnell.dev/posts/giftlist/routing/

twashing00:04:47

Oh nice. Lemme check!

twashing00:04:11

Calling (dr/initialize! app) didn’t fail. But calling this still gives the message (ie, doesn’t display the desired page).

(dr/change-route app ["index"])

INFO [com.fulcrologic.fulcro.rendering.ident-optimized-render:146] - Optimized render failed. Falling back to root render.

twashing00:04:20

Let me scan over the blog post.

codonnell00:04:08

Your idents and queries are not correct. The first element of an ident is the table where the component's state will be stored (ie. the top level key in app state). The second element is the key in the specified table where the component's data can be found.

codonnell00:04:02

Eg. an initial state {:component/id {:landing {:text "Landing text"}}} with ident (fn [] [:component/id :landing]) and query [:text] would be correct.

twashing03:04:42

@codonnell I’ve played around with the routing system and am still tripping over some parts. I was able to get a working Fulcro Root `:initial-state`, and `:query` and `:ident` on child components. But on initial load, the router fails with this.

core.cljs:159 ERROR [com.fulcrologic.fulcro.routing.dynamic-routing:410] - will-enter for router target beatthemarket.ui.root/Index did not return a valid ident. Instead it returned:  [:index/id nil]
core.cljs:159 ERROR [com.fulcrologic.fulcro.routing.dynamic-routing:410] - will-enter for router target beatthemarket.ui.root/Index did not return a valid ident. Instead it returned:  [:index/id nil]
So a command like `(dr/change-route app (dr/path-to root/Index))` fails with this.
react_devtools_backend.js:6 ERROR [com.fulcrologic.fulcro.routing.dynamic-routing:410] - will-enter for router target beatthemarket.ui.root/Index did not return a valid ident. Instead it returned:  [:index/id nil]

twashing04:04:37

But I feel like I’m missing something obvious.

codonnell04:04:54

It sounds to me like an issue with initial state. Fulcro inspect is tremendously helpful for debugging this kind of thing. I would strongly recommend using it if you're not. One way you could get to the bottom of it would be to start with the exact code from my blog post and change it one thing at a time to your code, seeing what change causes it to break.

✔️ 4
thomas07:04:10

Hi Everyone, I have been trying to understand and learn Fulcro for several months now and failing miserably at it and I kinda need it as we use it at the place where I started working recently. I was wondering if there is someone out (t)here that would like to learn Fulcro as well and would like to make this journey together. Maybe we can screenshare etc. and work on something together and help each other understanding Fulcro. (I am based in Europe, but could start earlier/later if that is more convenient for you timezone wise)

8
codonnell12:04:23

@thomas Have you watched the tutorial video series? It was really helpful for me. (https://www.youtube.com/playlist?list=PLVi9lDx-4C_T7jkihlQflyqGqU4xVtsfi)

thomas12:04:30

I have @codonnell, but I still have the problem of not grokking it all.

codonnell12:04:59

Gotcha. I like your idea, by the way. 👍

codonnell12:04:51

And if you have specific questions, people in this channel are pretty helpful.

folcon12:04:29

I’m personally in a bit of a similar situation, I find myself asking a lot of questions on here :)…

Jakub Holý (HolyJak)16:04:22

Same as I did - and still do :)

4
thomas12:04:11

I know... I have asked plenty of questions here and I really appreciate all the answers. thank you

thomas14:04:16

I have a question about routing... I have a TopRouter component and that should show something when the route is / and it does show that component, but the props that get past to the TopRouter component have none of the other data in it needed for the subcomponents.

fjolne16:04:08

the primary source of confusion with routers seems to be about composing initial-state, so I’d check it first: you need to initialize the router (from the parent) and to ensure that subcomponents are initialized correctly (via initial-state or in will-enter) other than that it’s hard to say anything specific without knowing the exact structure and queries

dvingo16:04:04

Hi @thomas for query debugging it can be useful to execute queries using the REPL, something like: (fdn/db->tree (comp/get-query root/Root {}) (app/current-state SPA) (app/current-state SPA))

8
thomas16:04:47

ok, I am going to give that a try, thank you @danvingo

dvingo16:04:25

it's a bit faster debug cycle than going through the ui

thomas16:04:24

cool. I'll try that after dinner...

Jakub Holý (HolyJak)17:04:01

@thomas I have also struggled with dynamic routing (and other things). Perhaps something from my "Fulcro field notes" could be useful to you - https://gist.github.com/holyjak/da15f613376bf7015385a7cd899ee3e8 This are not very well structured, it is more of a lab diary than a document for public consumption 🙂

👍 16
Piotr Roterski20:04:08

Hey, I just noticed that fulcro-rad and fulcro-rad-demo repos are no longer publicly accessible on github https://github.com/fulcrologic/ is it intentional? temporary? 😅 or was it just moved somewhere else?

😅 4
Piotr Roterski20:04:22

I might add that I fully respect owner's right to hide it and manage in whatever way. I'd just miss it if it was gone from public domain for good because it 's a very inspiring and ambitious piece of OSS. I noticed that it was missing when I tried to link clara-rules PoC branch to this discussion https://clojurians.slack.com/archives/C0904S2QJ/p1587391288152300

adamfeldman21:04:22

(EDIT: I was wrong 🙃) New logo and website? http://www.fulcrologic.com. Very nice! 👀

tony.kay21:04:43

no, that’s been there for years

adamfeldman21:04:25

👍 looks different than I remembered

Piotr Roterski21:04:39

@UCHV4JZ7A you probably had this url in mind http://fulcro.fulcrologic.com/ (notice fulcro. vs www. subdomain)

adamfeldman21:04:07

Ah yes, that’s it @pt.roterski 🙃

🙃 4
tony.kay21:04:07

RAD Status I am honestly struggling with RADs direction at the moment. Earlier today I decided to pull the repositories while I consider the costs/benefits of continuing it as public work. Fulcrologic, LLC has, to date, not actually placed a formal license on that source yet, and the alpha series releases have been my attempt at gauging community interest and benefit vs cost. There’s about $60k of investment in RAD so far. I think it is pretty good, and has so many promising avenues it can go down; however, it has also been a huge time sync (as has Fulcro over the past several years), and I can no longer justify the amount of time I’ve been putting into it, but honestly it is hard to make myself stop 🙂. I have new ideas about every 30 minutes, but I’m also trying to build a real business with it, and I only need about 20% of the things I think of. So, pulling the repositories is one way to temper the amount of temptation it presents, but I realize that might generate ill will in the community, and that is not my intention. So to answer @pt.roterski’s question: Intentional, but temporary. I’ve decided that I will continue to develop just the parts I need, but in the public space. This means that the direction of the libraries will be driven by my (and my customer’s) professional needs from the libraries. Fulcrologic, LLC will continue to provide paid support to get additions or fixes into the formal libraries on a timeline that fits your needs. As of today I’m setting the license on the RAD libraries to MIT, which is the same as on all of the other public Fulcrologic libraries. I’ll annotate the READMEs on the repositories with additional policy and contributor information.

48
adamfeldman22:04:13

Thank you Tony. I’m sure I’m not just speaking for myself when I say you’re hugely appreciated by the Fulcro community 🙂. I deeply respect that you’re focused on personal well-being and commercial sustainability, as we all should and must. Thank you for being very thoughtful and communicative, as usual (as observed in my time hanging around here).

💯 20
adamfeldman22:04:31

One more personal thought: I support and respect any OSS project communicating around what to expect from the community and contributors. (I’d also like to go on and on about how RAD has fired me up with excitement and changed my view of what is possible, etc etc, but instead I should be quiet and continue working on the business plan and properly learning Clojure so I can proceed with my prototype…)

Piotr Roterski22:04:15

Thank you for the answer! I think that's very fair. I greatly admire the immense amount of work that you've already put out there and I'd be honoured to be able to witness more of your ideas executed. RAD's idea has a great potential to be a revolutionary direction in software development and I haven't found any other project yet with comparable scope, ambition and foundations. I definitely wouldn't want to overexploit your talent and I recognise the dilemma of balancing time spent between private needs and building open source software - we are all facing it to a degree. Thank you for licensing RAD as MIT because if this idea is to succeed then it needs to be a community effort - we just need to step up and offload you from some of the work.

💯 32
Jakub Holý (HolyJak)10:04:39

This sounds as a very reasonable step! I will look into getting my organization to pay for any development we might need 🙂

Alister Lee23:04:57

Would people here (@thomas @folcon) be interested in collaborating on a personal finance app? I have started. The tagline would be: "if you're poor You Need A Budget, if you're time-poor, you need [awesome Fulcro app]" and would use regex's to make coding transactions faster than anything else. We'd give Fulcrologic (edit: and Wilker) a big equity stake.