Fork me on GitHub

This is strange. Has anyone experienced that (om/get-props this) returns an empty props object, even when you explicitly pass props? In my debugger, I can see that the props object on the component is set, yet get-props returns an empty object 😕


I’m assuming I’m doing something very wrong. But the parent component passes on the correct props, yet the child component (even though I can see in the debugger that the props object is set on the component) cannot seem to read props :S


@rhansen: sounds unlikely, but it could be a bug - would want to see a minimal case though as it hasn’t been reported before.


@rhasen I noticed that when trying to println props, it was nil for some reason, when it should not have been. However I am not at a computer and cannot give any more input, left before I got it sorted out. Though I'd be more inclined to belive I did something wrong, regarding passing props or queries.


@rhasen also nil is different from an empty object.. unrelated most likely.


Hmm… I’m going to poke around some more. I’m sure I’m doing something funky, otherwise more people would be having this problem. Will try to recreate in a minimal case if I cannot figure out what is going on.


@rhansen: are you using components? Maybe try using (om/props this) instead of om/get-props and see if it helps


@rhansen: not sure what your use case is, but get-props is private and I suppose it shouldn't be used (


@jetmind, @anmonteiro: That is probably it. Thanks. Every time I ask a question in this channel I walk away slightly embarrassed 😛


I was using get-state in the same render-fn, and get-props seemed appropriate, especially since I didn’t get a warning from figwheel that it was a private fn.


Same here :)


That naming can be quite confusing (`om/get-state`, om/get-computed, but not om/get-props)