Skip to content

Commit 2c8213c

Browse files
author
Leo Taifa Merinen
authored
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
1 parent a183174 commit 2c8213c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
ReloadInstructions,
2727
} from 'react-native/Libraries/NewAppScreen';
2828

29-
declare var global: {HermesInternal: null | {}};
29+
declare const global: {HermesInternal: null | {}};
3030

3131
const App = () => {
3232
return (

0 commit comments

Comments
 (0)