If you want changes to be reflected on the same pa...
# prisma-whats-new
f
If you want changes to be reflected on the same page with a loading indicator or something, do you have to use something like “componentWillReceiveProps” or something?
f
@fourcolors You can use a HOC and branch depending on the loading state of the data
If you dont know recompose you check it out it provides useful hocs such as branch — https://github.com/acdlite/recompose/blob/master/docs/API.md#branch
so no you dont need to use
componentWillReceiveProps
or just use the ternary operator in jsx like this
Copy code
{data.loading ?
  <p>loading …</p>
: <SomeComponent data={data} />
}
does this answer your question?
f
I think so, I guess I was confused about if componentWillReceiveProps was implemented when new data comes in for me or if that’s something I had to handle myself.