Store
Root Store
The root store consists of the following structure:
user_repo
: Userschat_repo
: Chatsmessage_repo
: Messages
Actions
There are a few actions that exist on the root store.
Name | Arguments | Description |
---|---|---|
login | input: LoginInput | Logs the provided user into the chat server. If the user doesn’t yet
exist, a new one is created. If the user does exist, the initially
provided |
logout | N/A | Logs the current user out of the chat server and resets the store. |
load | N/A | Gets the current user’s details |
Views
Name | Arguments | Description |
---|---|---|
user | The current logged in user | |
isLoggedIn | N/A | Returns true if you are logged into the chat server |