From e55756066b787483745c7927f78b0566a323d025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=A4ggmark?= Date: Fri, 5 Jun 2020 13:54:27 +0200 Subject: [PATCH] Docs: updates frontend style guides (#25391) * Update frontend.md * Update contribute/style-guides/frontend.md Co-authored-by: Marcus Olsson Co-authored-by: Marcus Olsson --- contribute/style-guides/frontend.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contribute/style-guides/frontend.md b/contribute/style-guides/frontend.md index 0d40993898d..c096de9ab31 100644 --- a/contribute/style-guides/frontend.md +++ b/contribute/style-guides/frontend.md @@ -15,6 +15,8 @@ Generally we follow the Airbnb [React Style Guide](https://github.com/airbnb/jav - [React](#react) - [Props](#props) - [State management](#state-management) + + - [Proposal for removing or replacing Angular dependencies](https://github.com/grafana/grafana/pull/23048) ## Basic rules @@ -324,6 +326,6 @@ static defaultProps: Partial = { ... } ## State management - Don't mutate state in reducers or thunks. -- Use helpers `actionCreatorFactory` and `reducerFactory` instead of traditional `switch statement` reducers in Redux. See [Redux framework](redux.md) for more details. +- Use `createSlice`. See [Redux Toolkit](https://redux-toolkit.js.org/) for more details. - Use `reducerTester` to test reducers. See [Redux framework](redux.md) for more details. - Use state selectors to access state instead of accessing state directly.