Compare commits

..
1 Commits
Author SHA1 Message Date
Leo Taifa Merinen 2c8213ce6c Update App.tsx (#133)
Our custom global variable would be nicer declared as a `const`.

`var` doesn't seem to present any advantages here.

Functionality-wise the block scope remains the same as the global scope.

Semantic-wise it's clear it is global as @emin93 already moved it below imports.

Also ib4 wave of ESLint `no-var` adopters (e.g. https://github.com/gabts/eslint-config-react-native-typescript).

Further, see: https://eslint.org/docs/rules/no-var#when-not-to-use-it
2020-04-13 17:46:49 +02:00
+1 -1
View File
@@ -26,7 +26,7 @@ import {
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
declare var global: {HermesInternal: null | {}};
declare const global: {HermesInternal: null | {}};
const App = () => {
return (