Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import React, { useEffect, FC } from 'react'
import { useSelector, useDispatch } from 'react-redux'
import UserList from '../../components/UserList'
import { RootState, RootDispatch } from '../../store'
const Users: FC = () => {
const users = useSelector((state: RootState) => state.users)
const dispatch = useDispatch<RootDispatch>()
useEffect(() => {
dispatch.users.load()
}, [])
return <UserList users={users} />
}
export default Users
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.