main

mattermost/focalboard

Last updated at: 28/12/2023 01:42

hooks.ts

TLDR

This file provides two custom hooks - useAppDispatch and useAppSelector - that can be used in React components to interact with the Redux store.

Methods

N/A

Classes

N/A

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

import {TypedUseSelectorHook, useDispatch, useSelector} from 'react-redux'

import type {RootState, AppDispatch} from '.'

export const useAppDispatch = () => useDispatch<AppDispatch>()
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector