Skip to content

Instantly share code, notes, and snippets.

View rochabianca's full-sized avatar

Bianca rochabianca

View GitHub Profile
@Chocksy
Chocksy / sentry-config.html
Last active September 12, 2024 09:14 — forked from impressiver/raven-config.html
Sentry.js configuration for logging JavaScript exceptions to Sentry (https://sentry.io/). Without the added ignore options, you'll quickly find yourself swamped with unactionable exceptions due to shoddy browser plugins and 3rd party script errors.
<!-- Sentry.js Config -->
<script src="https://js.sentry-cdn.com/{{ENV['SENTRY_PUBLIC_DSN']}}.min.js" type="text/javascript"></script>
<script type="text/javascript">
// custom functions to handle errors in JS.
function handleRouteError(err) {
Sentry.captureException(err);
}
function errorHandler(error, data, level) {
level = level || 'info';
@flavioribeirojr
flavioribeirojr / App.js
Last active October 30, 2018 12:01
Fluxo de componentes pai > filho
import React, { Component } from 'react'
class Filho extends Component {
render() {
const onClick = this.props.onClick
return (
<div>
<button onClick={() => onClick()}>
Click me!
</button>