This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-30
Channels
- # aws (1)
- # bangalore-clj (2)
- # beginners (64)
- # boot (29)
- # cider (4)
- # clara (14)
- # cljsjs (22)
- # cljsrn (24)
- # clojure (248)
- # clojure-austin (5)
- # clojure-berlin (1)
- # clojure-china (5)
- # clojure-france (1)
- # clojure-greece (1)
- # clojure-italy (2)
- # clojure-korea (6)
- # clojure-russia (76)
- # clojure-spec (2)
- # clojure-uk (59)
- # clojurescript (67)
- # cursive (12)
- # datascript (6)
- # datomic (126)
- # defnpodcast (2)
- # devcards (1)
- # docker (1)
- # events (2)
- # hoplon (14)
- # leiningen (1)
- # luminus (2)
- # midje (2)
- # mount (1)
- # off-topic (4)
- # om (6)
- # onyx (8)
- # parinfer (2)
- # perun (6)
- # proton (5)
- # re-frame (41)
- # reagent (6)
- # ring-swagger (3)
- # rum (1)
- # spacemacs (10)
- # specter (12)
- # yada (25)
hi. newbie question. is there any reason why a reaction might be returning a state of null?
subscribers seem to be triggered and so was the event that sets initial state of the db
@jorda0mega are you getting an atom of nil or just nil?
@mikethompson I solved it by using set!
instead of with-redefs
.
@vikeri out comes the howitzer !
@mikethompson In 0.9.0 changes, you have: "Added experimental tracing features. These are subject to change and undocumented at the moment. By default they are disabled, and will be completely compiled out by advanced optimisations." I understand that docs are coming, but could you give a short explanation of what the features are and why they were added? 🙂
@curlyfry we're trying to add the sort of tracing that higher level tools might need. But until we actually build those tools we can't be sure we have teh tracing correct. So we're just calling the low level tracing layer experimental for now
@mikethompson Great, thanks!
i'm thinking of writing an autocomplete that fetches the list of possible values from the server. i wonder if someone has already done this? I suppose this would be a case for coeffects? there's Lambda-X/re-complete but it isn't quite up to date
@shem, https://github.com/Day8/re-com/blob/e280e5cd2e56e9328ec19678bc017b4d196eac93/src/re_com/typeahead.cljs
it's incomplete however; e.g. I didn't find a way to listen for "Enter" key events
but may be a useful guide?
personally I think a basic reagent-based autocomplete component would be incredibly useful
perhaps a prepackaged react based solution would actually be a better choice: http://react-autosuggest.js.org/
thanks, that looks pretty elaborate. i'll cook up something. i did it once with om but it doesn't translate so well to re-frame
if you end up using a prepackaged solution, consider packaging it for cljsjs
ha, it's already on cljsjs 🙂
that still expects a static list of suggestions. if i got the coeffects right, it would be a good fit to use them to update the suggestions list based on user input
yeah no it should be dynamic for sure
see the github example
hmmm that doesn't seem to work properly (backspace is half-broken?)
@akiroz: an atom of nil
i have a users model more specifically an atom vector [], that i load on initial request, and then perform crud operations on it, eg, conj for adding, remove for delete and update-in for edit item, Just like my function gets notified if subscribed to users atom on any change to the it, i would love to a function be called that has ajax calls on changes to that atom, so that impurity is docoupled from the app.
@knaman I guess you could add an interceptor that does the ajax injected to all the events that updates your atom
@akiroz is there a way i can subscribe to a newly added object or something in future to a vector(eg users []) for new item add?
not that I'm aware of, but you could have an event that adds an item which triggers a http-fx
@akiroz i did
(js/console.info...)
on the value returned right before it is wrapped in the reaction atom and it looks like it is returning the right infoit is only when it is wrapped in the reaction atom that it becomes state: null
@jorda0mega Hmm... I think I've seen something like this before in this channel... are you using any interceptors?
none that I'm aware of
didn't think of that. let me try
thanks