sentry
sentry copied to clipboard
[Onboarding/React] Make snippet copy/pasteable and change to something that compiles
The current code snippet in the react onboarding prevents the code from compiling because it points to a non-existent method - the user never even gets to the point where the code gets executed, hence there it does not produce a Sentry issue:
return <button onClick={() => methodDoesNotExist()}>Break the world</button>;
This alternative worked for me:
function MyButton() {
return <button onClick={() => {throw new Error("This is your first error!");}}>Break the world</button>;
}