Created
January 9, 2022 08:17
-
-
Save hieptlccc/273c4acf068e8630b1d34096e912e997 to your computer and use it in GitHub Desktop.
global state - webex clone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
const [isLoading, setIsLoading] = useState(false); | |
const [user, setUser] = useState(null); | |
const [cometChat, setCometChat] = useState(null); | |
// menu id. | |
const [id, setId] = useState(null); | |
// chose meeting. | |
const [meeting, setMeeting] = useState(null); | |
// detect whether a new meeting was created so the list of meetings will be refreshed. | |
const [hasNewMeeting, setHasNewMeeting] = useState(false); | |
... | |
<Context.Provider value={{ isLoading, setIsLoading, user, setUser, cometChat, id, setId, items, meeting, setMeeting, hasNewMeeting, setHasNewMeeting }}> | |
... | |
</Context.Provider> | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment