You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good news here but there really aren't that many cases where we're doing this...
Just gonna kinda break down each one explain what the alternative should be...
Using component state for loading state instead of Onyx
This one is using a loading state locally in a component. Probably, it would be more ideal to find an Onyx key to put that loading state on. But seeing these kind of things does beg the question of where that "loading" state belongs. We've mostly defaulted to putting these on some Onyx key so that's what we should try to do here and move the error handling logic to the action.
Chaining actions together that could be combined into a single action and storing errors in component state
This one is a few different actions chained together which seems fine it should just be its own action. The error message should be set somewhere else and not in the component state.
This next two are kind of tricky because I don't think we should have a "navigate" logic added to a generic action that does not navigate when used in other places. But the easy solution is to take this and make it setSecondaryLoginAndNavigate() then refactor later if we need a version that does not navigate
Good news here but there really aren't that many cases where we're doing this...
Just gonna kinda break down each one explain what the alternative should be...
Using component state for
loading
state instead of OnyxThis one is using a
loading
state locally in a component. Probably, it would be more ideal to find an Onyx key to put that loading state on. But seeing these kind of things does beg the question of where that "loading" state belongs. We've mostly defaulted to putting these on some Onyx key so that's what we should try to do here and move the error handling logic to the action.App/src/pages/RequestCallPage.js
Lines 100 to 111 in 4e9b6b5
Another loading issue
App/src/pages/home/report/ReportActionsView.js
Lines 277 to 278 in 4e9b6b5
Chaining actions together that could be combined into a single action and storing errors in component state
This one is a few different actions chained together which seems fine it should just be its own action. The error message should be set somewhere else and not in the component state.
App/src/pages/SetPasswordPage.js
Lines 94 to 111 in 4e9b6b5
Navigation logic
This next two are kind of tricky because I don't think we should have a "navigate" logic added to a generic action that does not navigate when used in other places. But the easy solution is to take this and make it
setSecondaryLoginAndNavigate()
then refactor later if we need a version that does not navigateApp/src/pages/settings/AddSecondaryLoginPage.js
Lines 78 to 83 in 4e9b6b5
App/src/pages/settings/PasswordPage.js
Lines 97 to 102 in 4e9b6b5
The text was updated successfully, but these errors were encountered: