Where should we place the error boundaries for the toast system? #795
-
Seeking a decision
We need to decide on a pattern for consistently placing an error boundary, after which we can expect that all errors will be handled. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I feel somewhat strongly that this boundary should be within the component layer. That means that functions in the store layer will be expected to throw errors, and it means that we should never be calling the toast system from within the stores layer or utils functions. |
Beta Was this translation helpful? Give feedback.
-
Pavish and I chatted about this today and decided to go with his approach
That means that no files outside of |
Beta Was this translation helpful? Give feedback.
Pavish and I chatted about this today and decided to go with his approach
That means that no files outside of
sections
,components
, andpages
should call the toast system. And files within those directories should only call the toast system if they are specific to the view layer. Data-specific files should not call the toast system.