btholt / complete-intro-to-react-v6

learn React.js with Brian Holt
https://frontendmasters.com/courses/complete-react-v6/
Other
1.47k stars 214 forks source link

[error-boundaries] Redirect isn't working by itself. #43

Open AbdAllahAbdElFattah13 opened 3 years ago

AbdAllahAbdElFattah13 commented 3 years ago

Since componentDidUpdate won't be called for the 1st render, if any error happens in the first render, it won't get redirection automatically. This is mentioned in the course itself here https://frontendmasters.com/courses/complete-react-v6/redirect-on-error/ @-0:47 seconds.

I can create a PR for a fix (here and in the other repo) in a couple of days once this issue is acknowledged/approved. Let me know.