1.0.0 • Published 7 years ago
@side.co/client-debug v1.0.0
What's in this package
- A
Debugclass - A Sentry middleware for Redux with a
removeKeysutil function - An
ErrorBoundarycomponent
How to use it
Debug class
import {
debug,
} from '@side.co/client-debug';
debug.init({
environment: 'production' | 'staging' | 'development' | 'local',
dsnKey: 'sentry dsn key',
});
debug.setUser(data: { [string]: any });
debug.addBreadcrumb({
message: string,
data: Object,
category?: string,
level?: 'fatal' | 'error' | 'warning' | 'info' | 'debug',
});
debug.warn(message: string);
debug.log(message: string, data: Object);
debug.catch(e: Event);Middleware
import {
debugMiddleware,
} from '@side.co/client-debug';
const store = createStore(
reducer,
initialState,
applyMiddleware(
...,
debugMiddleware,
)
);ErrorBoundary component
import React from 'react';
import {
ErrorBoundary,
} from '@side.co/client-debug';
import ErrorPage from './components/ErrorPage';
const App = () => (
<ErrorBoundary errorUI={<ErrorPage />}>
<div className="app">
App content
</div>
</ErrorBoundary>
);
export default App;Update this package
- Make your updates on your branch, make your MR to
master - Once you code is on
master, checkout on master and executenpm version [<newversion> | major | minor | patch] - Commit and push on
masterthe new package version
1.0.0
7 years ago