Is passing the same ID as a parameter into a tab where two screen shares the same ID considered an anti-pattern? #12726
Answered
by
satya164
JosephLu2022
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
satya164
Aug 20, 2025
Replies: 1 comment 1 reply
-
|
Think of params as state. It's generally an anti-pattern to duplicate state to two places. It may be convenient to pass
So if your goal is to just access |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
JosephLu2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Think of params as state. It's generally an anti-pattern to duplicate state to two places.
It may be convenient to pass
route.paramsininitialParams, but it comes with many downsides:route.paramsupdates, the tab screens won't get new params becauseinitialParamsis applied on initial render, so you'll need to write more code to handle this, which negates the convenience