···250250 '@typescript-eslint/prefer-promise-reject-errors': 'warn',
251251 '@typescript-eslint/await-thenable': 'warn',
252252253253+ "no-restricted-imports": ["error", {
254254+ "paths": [{
255255+ "name": "react",
256256+ "importNames": ["React", "default"],
257257+ "message": "React is already in the global type namespace. Use named imports for runtime modules."
258258+ }]
259259+ }],
260260+253261 /**
254262 * Turn off rules that we haven't enforced thus far
255263 */
+3-3
src/lib/hooks/useAnimatedValue.ts
···11-import * as React from 'react'
11+import {useRef} from 'react'
22import {Animated} from 'react-native'
3344export function useAnimatedValue(initialValue: number) {
55- const lazyRef = React.useRef<Animated.Value>(undefined)
55+ const lazyRef = useRef<Animated.Value>(undefined)
6677 if (lazyRef.current === undefined) {
88 lazyRef.current = new Animated.Value(initialValue)
99 }
10101111- return lazyRef.current as Animated.Value
1111+ return lazyRef.current
1212}
+5-5
src/lib/hooks/useTimer.ts
···11-import * as React from 'react'
11+import {useCallback, useEffect, useRef} from 'react'
2233/**
44 * Helper hook to run persistent timers on views
55 */
66export function useTimer(time: number, handler: () => void) {
77- const timer = React.useRef<undefined | NodeJS.Timeout>(undefined)
77+ const timer = useRef<undefined | NodeJS.Timeout>(undefined)
8899 // function to restart the timer
1010- const reset = React.useCallback(() => {
1010+ const reset = useCallback(() => {
1111 if (timer.current) {
1212 clearTimeout(timer.current)
1313 }
···1515 }, [time, timer, handler])
16161717 // function to cancel the timer
1818- const cancel = React.useCallback(() => {
1818+ const cancel = useCallback(() => {
1919 if (timer.current) {
2020 clearTimeout(timer.current)
2121 timer.current = undefined
···2323 }, [timer])
24242525 // start the timer immediately
2626- React.useEffect(() => {
2626+ useEffect(() => {
2727 reset()
2828 // eslint-disable-next-line react-hooks/exhaustive-deps
2929 }, [])