This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws (5)
- # beginners (67)
- # boot (30)
- # cider (55)
- # clara (7)
- # cljs-dev (6)
- # cljsjs (6)
- # cljsrn (1)
- # clojure (136)
- # clojure-brasil (2)
- # clojure-dusseldorf (14)
- # clojure-finland (9)
- # clojure-italy (49)
- # clojure-nl (1)
- # clojure-romania (6)
- # clojure-russia (4)
- # clojure-uk (16)
- # clojurescript (136)
- # core-async (1)
- # cursive (21)
- # datomic (64)
- # fulcro (26)
- # hoplon (25)
- # jobs-discuss (53)
- # keechma (3)
- # leiningen (6)
- # luminus (11)
- # lumo (2)
- # off-topic (351)
- # om (1)
- # onyx (11)
- # parinfer (32)
- # portkey (9)
- # re-frame (45)
- # reagent (38)
- # shadow-cljs (60)
- # specter (9)
- # vim (8)
- # yada (22)
didn't realize that was new, new to reframe myself. 10x is really quite cool, much rather see work on that
@danielcompton I'm trying to get the error to show up in a minimal project. No luck yet. Wondering if it might be related to electron, so minimal electron project is next.
@danielcompton clone https://github.com/robert-stuttaford/bridge/, cd into it,
make, wait 10 seconds (lol), connect emacs cider repl to 7890, wait a few seconds for it to load stuff,
(integrant.repl/reset) from the
user namespace. visit localhost:8080, log in with
secret. you’ll be taken to the app. open your dev tools, the errors will be in the console.
i’ll write a function in dev/user.clj for you. ignore this until i ping you 🙂
ah, @danielcompton, once repl is connected, from the
Question: have you tried the code tracing yet? We're very interested in feedback.
not yet. as i start to dig into non-trivial ui stuff, i’ll switch it on and see what happens 🙂
Still investigating, code tracing is working just fine in a bare bones electron/reframe project.
re-frame-10x: since I'm adding some npms using webpack (it's the only way I can make some npm libs work: http://blob.tomerweller.com/reagent-import-react-components-from-npm), react is not available at the time 10x is compiled... is there a way to make 10x work with webpack? Or, more in general: is there a way to make 10x work when using npm libs that are not available in cljsjs, and which don't work using npm-deps?
Hmm, that’s really not a path that we’ve trodden. I suspect you could get it working, you would just need to exclude the cljsjs JARs and add them as NPM libs
I really don’t know much about this whole area, so probably can’t be much more help. If you come up with something, please let us know
well, the main thing I've come up with is not using lein, but try cljs-shadow. Lein has a lot of issues with npm packages (well, at least I have a lot of issues with lein and npm packaging)
First cljs app in a few years, and I'm a little rusty on how to bootstrap these dev tools. @danielcompton correctly pointed out I was using the wrong key chord to activate re-frame-10x, but the correct ctrl+H key combo isn't working for me either. Is there a command to simply invoke the tools that I could wire (e.g.) to a button?
What's the likelihood that the app's responsiveness to key events is like something that got mangled at compile time? I'm looking at the optimized .js right now and the code for detecting key events is barely recognizable as code
Hello. I am using LeafletJS and re-frame and I would like to add and remove markers on a map based on changes in the db. The issue I have is that the markers used by LeafletJS are not displayed via HTML nodes, a js function must be called on the LeafletJS map instead. I am not sure which pattern I should use to implement my map component. If anybody already faced that situation, please share your solution.
I have 2 solutions in mind (but they seem both hacky, there must exist a better solution) :
- I create a map-marker component which I use inside my map component to represent each marker data from the db, and I hook up the js functions on the
unmount event of the component. The problem is that I will probably have to create a useless div for each existing marker as a side effect.
- In a subscription I do myself a diff on the set of marker data each time it changes, and I fire some
:remove-marker that my map component will listen and ... I am not sure at that point.
Oops, forgot I was in reframe... I guess that's a better question for #clojurescript 🙂
@danielcompton Found it. The 10x debux error goes away if I remove
[org.clojure/spec.alpha "0.1.143"] from the :dependancies. I wasn't actually using spec yet, just had it there on the recommendation of the re-frame tutorial with the intention of using it later. Adding the spec require to my test project doesn't introduce the error so there may be some other factors I haven't yet found. Replacing and removing it in my main project does consistently cause and fix the error.
My mistake. Adding spec does cause the error in a repeatable manner in my test project as long as I correctly clean out all the generated js before running cljsbuild.
Is there an best practice on how manage form state in re-frame? A reagent form, a segment in the app-db? My google-fu has yielded examples but no reflections.
@planetmcd Perhaps look in the https://github.com/Day8/re-frame/blob/master/docs/External-Resources.md
@planetmcd i’ve tackled two different form setups in my bridge project, if that interests you https://github.com/robert-stuttaford/bridge/tree/master/src/bridge/event/ui
one is a create-form, with a form-local atom, and the other uses edit-in-place fields which handle edit/commit/cancel independently
for edit-in-place, i’ve got normal text done; next is dates, markdown-with-preview, and add/remove related entity reference
@mikethompson I must have missed something for when i tried to set it up it broke my project
@mikethompson and @robert-stuttaford thanks for the guidance. @mikethompson I’ve looked through the docs and examples and there are a ton of great resources there and the project docs are some of the best ever. Kudos to the day8 team, it is a joy to read. I am working my way through my first go at a re-frame app and while there are lots of examples of forms, I guess I was hoping someone had thought through the tradeoffs of storing state in a ratom local to the form and then sending the values through an event vs. just storing the state in the app-db and as you change a field, update it in the db and subscribe to changes. @robert-stuttaford I am still learning so thank you for sending me along samples of both. I like your
<== helpers. That is the first time I’ve seen that.
I’ll take a look at
re-form too. As I learn, I’m trying to understand the why’s of best practices. So again, thanks for the guidance.
@planetmcd https://www.stuttaford.me/2018/03/31/bridge-dev-diary--events-api/ may help you understand what i’m doing (i haven’t yet written a diary about the frontend)
I’ll give it a look. Thanks for sharing. In case others come across this exchange and are looking for relevant libraries to help with forms, I’ve found: https://github.com/pupeno/free-form https://github.com/tomasd/re-frame-forms