You’re missing the component where you store the context.
import React from "react";
export const UserContext = React.createContext(null);
export const UserProvider = (props) => {
// What are you storing????
// What are you using to update it????
// I assume the fetch logic to get lists of students???
const [foo, setFoo] = React.useState("whatever");
return (
<UserContext.Provider value={{ foo, setFoo }}>
{ props.children }
</UserContext.Provider>
);
};