@evo/errcatch
Advanced tools
Catch react errors
Weekly downloads
Readme
npm - https://www.npmjs.com/package/@evo/errcatch
Небольшой компонент вокруг error boundary API - https://reactjs.org/docs/error-boundaries.html.
Фичи:
npm i @evo/errcatch
import { ErrCatch, withErrCatch } from '@evo/errcatch'
const Component = () => (
<div>
<Component1/>
<ErrCatch>
<Component1/>
</ErrCatch>
</div>
);
// or HOC
const Component = withErrCatch(() => (
<div>
<Component1/>
</div>
));
import { setErrCatchLog } from '@evo/errcatch';
import * as gotcha from '@evo/gotcha-log';
setErrCatchLog((msg, error, info) => {
console.error(msg, error, info);
gotcha.error(msg, { message: error.message, stack: error.stack });
});
import { ErrCatch } from '@evo/errcatch'
const ErrorComponent = () => <div>Error</div>
const Component = () => (
<div>
<Component1/>
<ErrCatch errorComponent={<ErrorComponent/>}>
<Component1/>
</ErrCatch>
</div>
);
FAQs
Catch react errors
The npm package @evo/errcatch receives a total of 316 weekly downloads. As such, @evo/errcatch popularity was classified as not popular.
We found that @evo/errcatch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 14 open source maintainers collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.