@whitemordred/react-native-bootstrap5
Version:
A complete React Native library that replicates Bootstrap 5.3 with 100% feature parity, full theming support, CSS variables, and dark/light mode
14 lines • 663 B
TypeScript
import React from 'react';
/**
* Higher-order component that adds error handling to any component
* This prevents the entire app from crashing if a component fails
*/
export declare function withSafeRender<P extends object>(Component: React.ComponentType<P>, componentName: string): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<any>>;
/**
* Hook to wrap render functions with error handling
*/
export declare const useSafeRender: (componentName: string) => {
safeRender: (renderFn: () => React.ReactElement) => React.ReactElement;
errorHandler: (error: Error) => void;
};
//# sourceMappingURL=withSafeRender.d.ts.map