This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-21
Channels
- # announcements (1)
- # architecture (1)
- # beginners (125)
- # boot (6)
- # boot-dev (2)
- # calva (69)
- # cider (38)
- # cljs-dev (3)
- # clojure (212)
- # clojure-austin (7)
- # clojure-australia (1)
- # clojure-denver (2)
- # clojure-europe (3)
- # clojure-gamedev (1)
- # clojure-hamburg (8)
- # clojure-italy (10)
- # clojure-nl (31)
- # clojure-russia (3)
- # clojure-uk (57)
- # clojurescript (56)
- # core-async (3)
- # cursive (15)
- # datascript (1)
- # duct (28)
- # emacs (6)
- # events (1)
- # figwheel-main (11)
- # fulcro (22)
- # luminus (59)
- # lumo (2)
- # onyx (4)
- # overtone (1)
- # re-frame (1)
- # reagent (4)
- # remote-jobs (3)
- # rum (2)
- # shadow-cljs (84)
- # spacemacs (7)
- # speculative (5)
- # vim (1)
- # yada (127)
I made a ClojureScript library that is API compatible with Quiescent, supports hiccup and server-rendering, but does not use React. It's the answer to "what if React was just a rendering library?" https://github.com/cjohansen/dumdom
It is also a state management system of sorts
dumdom has no component local state
I guess I must be missing something here because I'm not understanding what this or Quiescent really accomplishes. State is optional in React and it even encourages only using state where necessary and use pure components everywhere else. State is necessary in some components so removing it entirely makes zero sense to me.
Then this is not for you 😊
I've been using quiescent for years
...but whom is it for?
People making webapps :man-shrugging:
I disagree that local state is ever necessary
Look, you're trying to pitch this out here for people to use so when someone is honestly asking you the purpose of it, being cheeky isn't going to bode well.
Sorry, not trying to be cheeky
But honestly, if you feel that local state is necessary I'm not going to convince you off it. I just happen to disagree
I can see that response didn't come off great, sorry. I guess it's for anyone who wants a solid rendering layer, but prefer to own their own data flow
I'd be happy to discuss it. I'm waiting for you to give the justification for your bold claim.
For components that would typically have a local state, what do you do instead?
I put everything in global state. It's a trade off, sometimes it's a little bit more of a hassle, but the benefits are tremendous in my opinion
Having everything in global state means you can always trivially freeze/recreate/address the state of the app
Makes for better apps in my experience, less state-related bugs, plus it's easier to debug
Downside is primarily not being able to ship shareable "smart components"
What kind of components do you typically give local state?
I had a feeling that was what you were going to suggest. Having everything in global state is the same as having all global variables. There are a lot of downsides there that you're getting your convenience from.
It's not comparable at all
It's more akin to a database
In fact, if you use Datascript, it is a database
does anybody have any experience with re-natal (cljs + figwheel on react-native)? i have some issues with the build step that i can't seem to solve... (and it's not trivial 😛 and yes i tried to google for it 😛 )
What’s the error message? I may be able to help
well the error message is that "a" is undefined 😛 but reason for "a" not being defined is a bit more complicated
oh god yes I got this when upgrading to react native 0.57
I wasn't able to fix it
I think it might be the thing about constant folding
then when the resulting file goes though babel.js some functions get removed for some <insert profanity here> reason
Is there an Next.js (https://nextjs.org) equivalent for Clojure/ClojureScript? I'm looking for the simplest way to deploy an web app with Clojure for the back end and ClojureScript for the client side.
Don’t think there’s a 1-to-1 equivalent, but in looking it over, Clojure(Script) Frameworks like Fulcro, re-frame+(kee-frame/etc) are going to cover most of what it offers. Fulcro tends to be more complete, but there’s a lot more to learn up front, re-frame, plus extra bits is easier to get into, but you’ll need to pull in and wire up the extra bits you need. For deployment, as has been pointed out, the sky is the limit. If you’re uberjar’ing then Herkou, AWS’ Elastic Beanstalk (or Fargate), etc are super easy. And if you want to paradoxically go the fancier and simpler route Datomic Cloud+Ions rock. If you’re on AWS @U4L16CHT9 mentioned S3 for front-end assets, we use AWS Amplify to make even that easier, as well as some nice integrations with other AWS services and some nice UI components too boot.
Datomic Cloud is another relatively easy way which I quite like (biased of course) - and you get a DB to boot
Datomic Cloud on the backend with a simple public S3 for front end is a combo hard to beat
with figwheel-main, do I need to include something in my figwheel-main.edn that indicates that it should actually perfom the hooks I have defined?
I have an ns with ^:figwheel-hooks
and a function with ^:after-load
, but when it recompiles, it doesn't run those functions :/ interestingly, if I just put a call to the function in the namespace, it will call it as it re-evals the compiled js