
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@vlsergey/react-bootstrap-error-boundary
Advanced tools
Ready-to-use error boundary with Bootstrap Alert as error text display
Ready-to-use error boundary with Bootstrap Alert as error text display.
Do not duplicate same code of for Alert usage in different projects.
npm i --save @vlsergey/react-bootstrap-error-boundary
or
npm i --save-dev @vlsergey/react-bootstrap-error-boundary
import ErrorBoundary from '@vlsergey/react-bootstrap-error-boundary';
/*...*/
<ErrorBoundary>
{/*...*/}
</ErrorBoundary>
import Button from 'react-bootstrap/Button';
import ErrorBoundary from '@vlsergey/react-bootstrap-error-boundary';
class MyComponent extends PureComponent {
state = {
retryCounter : 0,
}
handleRetry = () =>
this.setState( ({retryCounter}) => ({retryCounter : retryCounter+1}) );
render() {
return <>
{/*...*/}
<ErrorBoundary
errorMessageSuffix={<><br /><Button onClick={this.handleRetry}>retry</Button><>}
key={`ErrorBoundary_${this.state.retryCounter}`}>
{/*...*/}
</ErrorBoundary>
{/*...*/}
</>;
}
}
| Property | Type | Default value | Description |
|---|---|---|---|
| logToConsole | boolean | true | Log error and react error info to browser console |
| errorMessage | ( error : unknown ) : ReactNode | (prefix)(error) | Text (react node) to display on error as Alert children. Defined as function of error. |
| errorMessagePrefix | react node (may be string) | "Error occured: " | Prefix to display before error message. Ignored if errorMessage function is provided. |
| errorMessageSuffix | react node (may be string) | "" | Suffix to display after error message. Ignored if errorMessage function is provided. |
| variant | See bootstrap Alert variants | 'danger' | Alert variant to display |
Unspecified minor versions are for dependencies updates.
FAQs
Ready-to-use error boundary with Bootstrap Alert as error text display
We found that @vlsergey/react-bootstrap-error-boundary demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.