Skip to content

Commit 39add3b

Browse files
committed
Added FAQ doc
1 parent 5c61bf7 commit 39add3b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/reference/faq.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: FAQ
3+
menu: Reference
4+
route: '/reference/faq'
5+
---
6+
7+
# Frequently Asked Questions
8+
9+
- [Why I need to use `result.current` instead of just `result`?](/reference/faq#why-i-need-to-use-resultcurrent-instead-of-just-result)
10+
11+
---
12+
13+
### Why I need to use `result.current` instead of just `result`?
14+
15+
The "ref-like" representation of the hook's result allows the value to be updated when the hook gets rerendered, whether that be from calling `rerender`, calling a callback returned from the hook, or an asynchronous action triggered by executing the hook. Without `current` the library would have to provide some way of requesting the updated values for assertions.

0 commit comments

Comments
 (0)