Drop redundant bootstrap error boundary
React Router routes render and loader errors to the route-level boundaries, so the App-level boundary above the router could only catch provider render failures — which today are trivial — while true bootstrap failures throw at module load before it mounts. Neither console nor trust wraps App this way. Rely on the root route boundary instead and remove the BootstrapError fallback it used. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -18,19 +18,15 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
import { ErrorBoundary } from "@probo/ui/src/v2/ErrorBoundary/ErrorBoundary";
|
||||
import { RouterProvider } from "react-router";
|
||||
|
||||
import { BootstrapError } from "#/components/errors/BootstrapError";
|
||||
import { RelayProvider } from "#/lib/relay/RelayProvider";
|
||||
import { router } from "#/routes";
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
<ErrorBoundary fallback={<BootstrapError />}>
|
||||
<RelayProvider>
|
||||
<RouterProvider router={router} />
|
||||
</RelayProvider>
|
||||
</ErrorBoundary>
|
||||
<RelayProvider>
|
||||
<RouterProvider router={router} />
|
||||
</RelayProvider>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user