Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

React Native cannot find name of Global Object?

$
0
0

I use the global variable in React Native, Eg: global.gScreen = { };

When i use gScreen, eslint reports can not find name 'gScreen'.

I have try this:

  1. In tsconfig.json add "node" to compilerOptions.types not working{"compilerOptions": {..."types": ["node"]...}}

  2. global.d.ts declare global not working

  3. .eslintrc.js globals config not working


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>