What is the best way to check if a param is valid
#10156
Unanswered
KirianCaumes
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi 👋
I'm wondering what is the best way to check if a
paramis valid or not.Let's say I have something like this:
This way, with the
loader, I can verify if myparams.searchidis valid (with some conditions). And it's seems to work fine.But, as I use Why Did You Render, it shows me that my
Layoutcomponent is re-rendering because of some internaluseContextfromreact-router.If I remove the
loader, it works fine, no more re-rendering.Is there a way avoid thess useless re-rendering? Or do you know a better solution to achieve it?
Thanks 🙏
Beta Was this translation helpful? Give feedback.
All reactions