import { useSelector } from "react-redux"; import { useRematchDispatch } from "../shared/utils"; import { initializeStore } from "../shared/store"; import CounterDisplay from "../shared/components/counter-display"; import Header from "../shared/components/header"; const Github = (props) => { const github = useSelector((state) => state.github); const { users, isLoading } = github; const { fetchUsers } = useRematchDispatch((dispatch) => ({ fetchUsers: dispatch.github.fetchUsers, })); const { usersList } = props; return (
Server rendered github user list. You can also reload the users from the api by clicking the Get users button below.
Loading ...
: null}{users.length === 0 ? null :