State
State Management
Solana App Kit provides a comprehensive state management solution using Redux Toolkit. Our state modules are designed to be modular, allowing you to import only what you need.
Auth State
The auth state slice handles user authentication, profiles, and session management.
Structure
Key Functions
loginSuccess
- Updates state after successful authenticationlogoutSuccess
- Clears user data on logoutfetchUserProfile
- Async thunk for retrieving user profile dataupdateUsername
- Updates the user’s username in the databaseupdateProfilePic
- Updates the user’s profile picture
Usage
Other State Slices
- Thread State - Manages social posting, comments, and engagement
- Transaction State - Handles pending and completed blockchain transactions
- Wallet State - Manages wallet connections and token balances
See individual state module documentation for more details on each slice.