You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+171-1Lines changed: 171 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -506,7 +506,177 @@ See [https://github.com/zalmoxisus/remote-redux-devtools#parameters](https://git
506
506
507
507
## Usage with Typescript
508
508
509
-
Easy Peasy has full support for Typescript. Detailed documentation is coming soon, however you can view the [original PR](https://github.com/ctrlplusb/easy-peasy/pull/57) for an example on how to use Typescript effectively.
509
+
Easy Peasy has full support for Typescript, via its bundled definitions. More detailed documentation is coming soon, however, you can expand the below to get a general overview of how to use Typescript with Easy Peasy.
510
+
511
+
<details>
512
+
<summary>Overview of using Typescript with Easy Peasy</summary>
513
+
<p>
514
+
515
+
Firstly, you need to define a type that represents your model. Easy Peasy exports numerous types to help you declare your model correctly.
The above can become a bit cumbersome - having to constantly provide your types to the hooks. To avoid this you can use @formula349's [tip](https://github.com/ctrlplusb/easy-peasy/issues/21#issuecomment-457644655), where you export pre-typed versions of the hooks along with your store.
0 commit comments