Closed JLou closed 2 years ago
When using withAuthentication from @axa-fr/react-oidc-context-fetch, the component wrapped will rerender too many times.
withAuthentication
@axa-fr/react-oidc-context-fetch
In 3.1.6 with my reproduction code I get "toto 2", and in "3.1.7" I get "toto 6"
3.1.6:
3.1.7:
git clone https://github.com/JLou/repro-bug-react-oidc.git cd repro-bug-react-oidc npm i npm start
3.1.7 & below
fetch should not change during the lifespan of the app, and should definitely not trigger a rerender of my wrapped component
it does
The rerender problem is fixed in v4 by sliting hooks and by removing data duplication inside react.
I close the issue, thank you for it. The v4 fixe it. Feel free to re-open an issue if you need it.
Issue and Steps to Reproduce
When using
withAuthentication
from@axa-fr/react-oidc-context-fetch
, the component wrapped will rerender too many times.In 3.1.6 with my reproduction code I get "toto 2", and in "3.1.7" I get "toto 6"
3.1.6:
3.1.7:
Versions
3.1.7 & below
Screenshots
Expected
fetch should not change during the lifespan of the app, and should definitely not trigger a rerender of my wrapped component
Actual
it does
Additional Details