States from Backend
Learn how to use states from the backend in the frontend.
Middleware Data State
This state is used to get the middleware data from the server like:
- Available languages,
- Global settings: title, description, etc.
- Plugins code,
- Middleware settings, for example: editor settings, captcha provider etc.
User Data State
This state is used to get the user data with personal settings (for example: files settings).
Admin Data State
Inside admin
route you cannot use getSessionData
function. You need to use getAdminSessionData
function.
That's because admin
has different settings and permissions.
User Id from Cookie
Sometimes might be useful to get the user id from the cookie. For example for tags
in fetch
cache.