Closed rubencodes closed 9 years ago
I naively set out to implement this using parse-react by observing a query in one component and passing that data as a prop to a secondary component, but I realize now that the observe
function isn't called on prop updates so the query isn't rerun. Really need a way around this...Perhaps some way of triggering the query to rerun from componentWillUpdate?
Got it! Turns out the observe function is passed newProps and newState as parameters, so if I set the props in the parent container, I can use in the containedIn filter on the child, and it works.
This is more a question of practices than an issue (though I suppose it's an issue in that I don't know if this is possible), but I have a special case where I need to make a query based off of info I get from another query. Ideally I want to do this in the same component. Is this possible?
e.g. the way I have it set up right now using only Parse and React (not Parse-React) is:
Using Parse-React, can I make a component observe (in this example) QueryTwo AND QueryOne?