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
I added a new v0.12.0 docs version to the rescript-11 branch. It only needs to be updated
Below are the relevant changes from the changelog for reference
Deprecated use*N functions in favor of changing the signature of the main hook function.
For example, useEffect instead of useEffectN e.g. useEffect3(f, (a, b, c)) -> useEffect(f, (a, b, c))
The affected hooks include useEffect, useLayoutEffect, useCallback, useMemo, useImperativeHandle, useInsertionEffect
With this change, it is now possible to pass any value as the second argument 'deps. In case you pass an invalid value, you will get a warning from React at runtime. You should be using one of the following values for the dependency array:
0 dependencies: []
1 dependency: [a]
more than 1 dependency: (a, b, ...)
For calling useEffect, useLayoutEffect etc. without a dependency array (meaning that the effect is executed on every render), there are now separate bindings useEffectOnEveryRender, useLayoutEffectOnEveryRender etc.
Added React.lazy_.
The text was updated successfully, but these errors were encountered:
I added a new v0.12.0 docs version to the rescript-11 branch. It only needs to be updated
Below are the relevant changes from the changelog for reference
useEffect3(f, (a, b, c))
->useEffect(f, (a, b, c))
useEffect
,useLayoutEffect
,useCallback
,useMemo
,useImperativeHandle
,useInsertionEffect
'deps
. In case you pass an invalid value, you will get a warning from React at runtime. You should be using one of the following values for the dependency array:[]
[a]
(a, b, ...)
useEffect
,useLayoutEffect
etc. without a dependency array (meaning that the effect is executed on every render), there are now separate bindingsuseEffectOnEveryRender
,useLayoutEffectOnEveryRender
etc.React.lazy_
.The text was updated successfully, but these errors were encountered: