geekodour
06/18/2017, 5:29 PMthis.props.data.loading
does not work sometimes. This has to do something with the graphcool servernilan
06/18/2017, 6:06 PMgeekodour
06/18/2017, 6:10 PMthis.props.data.allPosts
, on random reloads the data will show up correctly. On others it will show this.props.data.allPosts
is undefined
. which should never happen if data.loading
is working correctly.nilan
06/18/2017, 6:15 PMthis.props.data.allPosts
is undefined
? 🙂nilan
06/18/2017, 6:15 PMgeekodour
06/18/2017, 6:17 PMnilan
06/18/2017, 6:18 PMgeekodour
06/18/2017, 6:22 PMgeekodour
06/18/2017, 6:22 PMhttp://i.imgur.com/undefined.png▾
geekodour
06/18/2017, 6:22 PMgeekodour
06/18/2017, 6:23 PMgeekodour
06/18/2017, 6:23 PMnilan
06/18/2017, 6:24 PMnilan
06/18/2017, 6:24 PMthis.props.data.loading
is false
? 🙂geekodour
06/18/2017, 6:27 PMrender () {
if (this.props.data.loading) {
return (<div>Loading</div>)
}
return (
<div>
useful things here
</div>
)
}
nilan
06/18/2017, 6:27 PMnilan
06/18/2017, 6:27 PMckelley
06/18/2017, 7:50 PMallPosts
? it sounds like you're using Apollo client; sometimes when updating variables or manually updating the client-side cache I've seen the data.loading
variable remain falseckelley
06/18/2017, 7:52 PMnilan
06/18/2017, 7:54 PMckelley
06/18/2017, 7:55 PMnilan
06/18/2017, 7:55 PMdata.loading
was not behaving correctly as well. That wasn't the problem here though