mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
RN: Prefer Destructured Import for useReducer (#51411)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51411 Prefers using this as a destructured import instead of as a member expression of `React`. Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D74895840 fbshipit-source-id: 0a3d78d2871c3334b6e1b570744962a4d0168a9e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2e95617c2b
commit
0a41b70164
@@ -28,7 +28,7 @@ import {
|
||||
initialNavigationState,
|
||||
} from './utils/testerStateUtils';
|
||||
import * as React from 'react';
|
||||
import {useCallback, useEffect, useMemo} from 'react';
|
||||
import {useCallback, useEffect, useMemo, useReducer} from 'react';
|
||||
import {
|
||||
BackHandler,
|
||||
Button,
|
||||
@@ -65,7 +65,7 @@ const RNTesterApp = ({
|
||||
},
|
||||
customBackButton?: BackButton,
|
||||
}): React.Node => {
|
||||
const [state, dispatch] = React.useReducer(
|
||||
const [state, dispatch] = useReducer(
|
||||
RNTesterNavigationReducer,
|
||||
initialNavigationState,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user