Skip to content

Instantly share code, notes, and snippets.

@Gemorroj
Last active July 29, 2018 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gemorroj/5e7114da3a0702635aa62eb8c1114d18 to your computer and use it in GitHub Desktop.
Save Gemorroj/5e7114da3a0702635aa62eb8c1114d18 to your computer and use it in GitHub Desktop.
redux global state example
{
"isLoggedInUser": false,
"components": {
"login": {
"isLoading": false,
"error": null
},
"grid_posts": {
"isLoading": false,
"error": null,
"filter": {"orderBy": "id", "sort": "desc"}
}
},
"entities": {
"currentUser": {}
}
}
@Gemorroj
Copy link
Author

Gemorroj commented Jul 29, 2018

работа с лоадером 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
список сущностей для грида не храним в глобальном сторе, т.к. хотим его вытягивать постоянно при инициализации компонента (чтобы иметь наиболее актуальные данные).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment