The store will hold variables that are intended to be accessible throughout the app. Users will be able to retrieve and modify these variables from anywhere within the app.
getState
getState() takes a property name as input and returns the value of that property.
Parameter/Input:
key: string
The function returns the value of the key if it exists, and undefined if it doesn't.
store.getState
store
The store will hold variables that are intended to be accessible throughout the app. Users will be able to retrieve and modify these variables from anywhere within the app.
getState
getState()
takes a property name as input and returns the value of that property.Parameter/Input:
key
: stringThe function returns the value of the
key
if it exists, andundefined
if it doesn't.