-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Documentation for ReactWrapper#update is wrong #1405
Description
Hi,
The latest documentation for ReactWrapper#update (
https://github.com/airbnb/enzyme/blob/3ac9895c03e71816e58bc534aa6dd635e9311f59/docs/api/ReactWrapper/update.md) appears to be incorrect.
It states that calling .update() forces a re-render. I believe that was the case in Enzyme 2, but is no longer the case in Enzyme 3. It now merely refreshes the wrapper tree from the React tree.
I'd also like to confirm with you that it's the documentation that's incorrect and not the behaviour, and that you don't plan to change update so it does cause a re-render? It's very important that we are able to refresh wrappers without triggering React re-renders, because we sometimes need to check that a particular set of operations has caused a render to happen already.
(Out of interest, we're currently in the middle of upgrading our several-thousand unit tests from Enzyme 2 to Enzyme 3 and have around 200 failing tests as a result. The main problem is due to the semantic change in wrappers no longer being live views of the React render tree.)
Thanks,
Royston.