Add code heading in comparison with Zustand and Redux (#1777)

* Add code heading

* Add newline

Co-authored-by: Danilo Britto <dbritto.dev@gmail.com>

---------

Co-authored-by: Danilo Britto <dbritto.dev@gmail.com>
This commit is contained in:
Arul Murugavel B 2023-04-30 19:01:33 +05:30 committed by GitHub
parent e71e313bd7
commit 22db0014bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,8 @@ both are based on an immutable state model.
However, Redux requires your app to be wrapped
in context providers; Zustand does not.
**Zustand**
```ts
import { create } from 'zustand'
@ -74,6 +76,8 @@ const useCountStore = create<State & Actions>((set) => ({
}))
```
**Redux**
```ts
import { createStore } from 'redux'
import { useSelector, useDispatch } from 'react-redux'