Last active
July 29, 2018 10:19
-
-
Save Gemorroj/5e7114da3a0702635aa62eb8c1114d18 to your computer and use it in GitHub Desktop.
redux global state example
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
{ | |
"isLoggedInUser": false, | |
"components": { | |
"login": { | |
"isLoading": false, | |
"error": null | |
}, | |
"grid_posts": { | |
"isLoading": false, | |
"error": null, | |
"filter": {"orderBy": "id", "sort": "desc"} | |
} | |
}, | |
"entities": { | |
"currentUser": {} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
работа с лоадером http://react.semantic-ui.com/elements/loader/#types-loader
начальная инициализация стора https://stackoverflow.com/questions/41786185/initialize-state-with-async-data-in-redux
пример регистрации/логина https://github.com/cornflourblue/react-redux-registration-login-example
список сущностей для грида не храним в глобальном сторе, т.к. хотим его вытягивать постоянно при инициализации компонента (чтобы иметь наиболее актуальные данные).