Creating a log boundaries utility for wrapping react errors

This commit is contained in:
apanizo 2018-09-03 15:56:19 +02:00
parent 916b38c589
commit 6bcc351fa2
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
// @flow
export type Info = {
componentStack: string,
}
export const logComponentStack = (error: Error, info: Info) => {
// eslint-disable-next-line
console.log(error)
// eslint-disable-next-line
console.log(info.componentStack)
}