Fork me on GitHub

@matthewdaniel we cycle around to look at it again every 6 months or so.


i see, good to know. thanks


We've been a bit distracted by work on re-frame-10x


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, 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.


Can I do it without Cider?


i’ll write a function in dev/user.clj for you. ignore this until i ping you 🙂


btw, @danielcompton and everyone else who helped: 10x is dreamy. bravo!


ah, @danielcompton, once repl is connected, from the user namespace: (integrant.repl/reset)


@robert-stuttaford thanks! New release pending with a few new things.


Question: have you tried the code tracing yet? We're very interested in feedback.


Interested and scared


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.


about re-frame-10x: since I'm adding some npms using webpack (it's the only way I can make some npm libs work:, 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?


I'm using the luminus skeleton with +reframe included


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


"this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;" hmmmmmmm


10x only support optimisations none


Not sure if that’s what you’re looking for?

Vincent Cantin13:04:19

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 mount and 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 :add-marker and :remove-marker that my map component will listen and ... I am not sure at that point.


What's the idiomatic way to instantiate a Javascript object that ordinarily gets constructed with 'new'? e.g. "var sphere = new THREE.SphereGeometry(3,3,3);"


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.


Also i seem to remember there was a re-form library


@planetmcd i’ve tackled two different form setups in my bridge project, if that interests you


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 ==> and <== 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 may help you understand what i’m doing (i haven’t yet written a diary about the frontend)


the ==> <== look nicer if you use 🙂

💥 1

where are the docs for ==> i haven't seen this yet


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: