Fork me on GitHub

when you say bind-queries, is that the same as conman/bind-connection? i've tried rerunning that in the repl after sql file changes, and then calling (reset) to get mount to reinitialise all components, however my code still references the original sql file


@dhruv err yeah sorry typo there, I meant bind-connection


note that you shouldn't need to reinitialize the components


bind-connection should be reloading the function definitions in the namespace, the mount state is only managing the connection itself


I did have issues in cursive where it caches files


so even when you change the sql file on disk, it's still the old file in the IDE


but that's an intellij specific issue


ahh thanks for that.. yep i think i may be facing a caching issue. if i call bind-connection and then call (my-query) in the repl, it reflects the changed sql file. however if i call (my-query) from another namespace, it still seems to cache the old value


thanks for your help


oh in that scenario it is actually the namespaces that need to be reloaded, not an issue of IDE caching


you do have to use (refresh-all) then or at least refresh the referencing namespaces


it's due to the fact that the other namespace references a stale var after bind-connection reloads it


perfect - thanks for explaining! 🙂


yogthos for president 2020: make debugging great again


does the Luminus template use component now?


nope, still on mount 🙂


I'm just using the term component to refer to stateful resources


ah okay, I've watched so many talks on stateful component management and it all made so much sense but then when I start a new project I totally forget all about it. That's what I like about luminous, encourages best practices by default


I'm somewhat inexperienced with both Clojure and Luminus so forgive if this is silly. I'm following along with the Web Dev with Clojure book and am trying to understand the Reagent section.


I've got some sample code (just an atom, a function which generates a block of html and pulls values from the atom, and a render function) which runs fine in my application core namespace but when I move it into it's own namespace separate from core it isn't running anymore.


core is the only entrance to the CLJS code that runs right? and since JS isn't multithreaded that means that I need to write my app logic in core and just refer to project.other_namespace functions right? or no...


Basically I'm trying to understand the appropriate CLJS pattern for refactoring code I guess. I'm writing little widgets and thought it would make sense to put the logic for each widget in its own namespace I guess.