react-native-root-toast icon indicating copy to clipboard operation
react-native-root-toast copied to clipboard

Error: LogBox must be enabled before AppContainer is required so that it can properly wrap the console methods.

Open linbo8303 opened this issue 4 years ago • 2 comments

react-native-root-toast conflict with LogBox

Simulator Screen Shot - iPhone 11 - 2020-05-07 at 09 44 26

linbo8303 avatar May 06 '20 23:05 linbo8303

Not sure this is a conflict with the toast library. But I'm assuming you've put the require('react-native').unstable_enableLogBox(); at the top of the index.js file? Didn't work for me either.

What worked for me was creating a "before.js" file only containing the require('react-native').unstable_enableLogBox(); line. And then import './before'; at the very top of index.js

Tejpbit avatar Jun 05 '20 07:06 Tejpbit

Não tenho certeza se isso é um conflito com a biblioteca do brinde. Mas suponho que você colocou o require('react-native').unstable_enableLogBox();arquivo no topo do arquivo index.js. Também não funcionou para mim.

O que funcionou para mim foi criar um arquivo "before.js" contendo apenas a require('react-native').unstable_enableLogBox();linha. E então, import './before';no topo do index.js

Yes, this is working for me. I have the same problem after adding lib react-native-tiny-toast to my project.

another solution is to update react-native to version 63.0 to automatically support logbox

d4niells avatar Jul 29 '20 14:07 d4niells