I am a polyglot seasoned software engineer. Besides the day job, I contribute to open source projects, beta test startup products, and offer consultancy.
Hi @nas5w
. Thanks for writing this article. Great use of the useEffect cleaner.
I think another way to resolve this issue is to keep the buttons disabled until the promise is resolved or rejected. This will make for a less confusing UX. User will not be able to click the conflicting buttons to being with.
Thanks! I think in this example, however, you wouldn’t want to prevent someone from navigating to another user’s profile just because a fetch request hasn’t returned. The user should be able to freely navigate the application regardless of whether the fetch request has resolved.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi @nas5w . Thanks for writing this article. Great use of the
useEffect
cleaner.I think another way to resolve this issue is to keep the buttons disabled until the promise is resolved or rejected. This will make for a less confusing UX. User will not be able to click the conflicting buttons to being with.
Thanks! I think in this example, however, you wouldn’t want to prevent someone from navigating to another user’s profile just because a fetch request hasn’t returned. The user should be able to freely navigate the application regardless of whether the fetch request has resolved.