I am trying to use fulcro. For generating CSS classes I use fulcro-garden-css.
I wish to create a component which generates CSS based on the props
I get following when I try to do that:
Warning :undeclared-var in com/vadelabs/foundation/components/layout.cljc at 48:40
Use of undeclared Var com.vadelabs.foundation.components.layout/props
45 |
46 | (defsc Grid
47 | [this props]
48 | {:css [[:.red (utils/use-style-props props grid-style-props)]]}
49 | (let [children (comp/children this)
50 | other-props props
51 | style-props (utils/use-style-props other-props grid-style-props)
52 | {:keys [red]} (css/get-classnames Grid)]
Any way to resolve this?Props is not available there
Css resolution based on props at runtime would be horribly slow
I was trying to use stylefy
but I get following warning:
Getting Invalid DOM property `class`. Did you mean `className`?
as per the author of stylefy
only works with reagent.
I am not sure how performant it could be. stylefy
uses some sort of caching.
I will try to figure something out…Does anyone also have a hard time working with contentEditable = true
?
@rob703 In short, for instance, handling changes is somewhat messy and setting the value of the editable element resets the cursor. I was asking because I don't know how much of this misbehavior is due to Fulcro, React, or just is inherent to editing elements.
@adam678 you might try synchronous transactions (comp/transact!!), they were introduced for related cursor-misbehaving issues
@fjolne.yngling Great, thanks!
Didn't try it yet, but i wanted to today. What's the problem?
draft-js
makes it somewhat bearable
hey, I'm having a weird UNSUPPORTED VALUE
for all values in Transactions & Network tabs; DB values are good; using Fulcro Inspect's latest Chrome plugin (3.0.1, released 8 days ago), Fulcro 3.4.3, no custom transit encoders set up
There was an issue with the inspect in Chrome. I had to download it manually and install it
yes, I did that, latest release from Github
okay, so I checked that previous version (3.0.0) works fine
If I dont know fulcro, is it crazy to start with RAD?
Nope, and as far as I know Tony is actually recommending it for all new projects since it's more or less finalized in the major points (correct me if I'm wrong).
There's a few bits explicitly not handled: http://book.fulcrologic.com/RAD.html#_authorization_middleware I guess there people are falling back to normal Fulcro solutions, seems like quite a hard problem generally
I've actually started more or less using RAD form-save events for everything and I stuck some auth middle ware in there. It's working alright
hm…seems to be a regression. I just noticed that as well.
right, but it does not eliminate the need to know Fulcro…it’s just good to have some bits of it as a nice starting point
digging into the fulcro rad book first and then will probably read relevant sections of the full book as they come up
so, let me clarify: I recommend including RAD as dependency. You will have to know Fulcro first in order to really be able to do much in terms of building a real app, since you still have to make a container app for any RAD element….but the RAD demo gives you a decent starting point layout for the project.
@fjolne.yngling https://github.com/fulcrologic/fulcro-inspect/releases/tag/chrome-3.0.2
fixes chrome inspect regression on network+txn tabs
see release notes on prior versions of chrome zipfile for how to install