Commit ac86fc9
committed
create useStateRef hook internally
this avoids the need to constantly save the update hook
since the original effect function holds onto a ref that
will always be up to date. in the prior implementation
there was some delay that was introduced (presumably due
to triggering updates on stale callbacks).1 parent e881dfa commit ac86fc9
2 files changed
+19
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 49 | | |
56 | | - | |
| 50 | + | |
57 | 51 | | |
58 | 52 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 53 | | |
66 | 54 | | |
67 | | - | |
68 | | - | |
| 55 | + | |
| 56 | + | |
69 | 57 | | |
70 | 58 | | |
71 | | - | |
| 59 | + | |
72 | 60 | | |
73 | 61 | | |
74 | | - | |
| 62 | + | |
75 | 63 | | |
76 | 64 | | |
77 | 65 | | |
| |||
81 | 69 | | |
82 | 70 | | |
83 | 71 | | |
84 | | - | |
| 72 | + | |
85 | 73 | | |
86 | | - | |
87 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
88 | 79 | | |
89 | 80 | | |
90 | 81 | | |
| |||
212 | 203 | | |
213 | 204 | | |
214 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments