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
The package export is a **React hook** called `useFloatToolkit`. It returns an object with an `output` state, as well as math functions that also serve as setters for the output.
29
29
30
30
```js
31
-
importReact, { useEffect } from"react";
31
+
import { useEffect } from"react";
32
32
importuseFloatToolkitfrom"@float-toolkit/react";
33
33
34
34
functionSum({ x, y }) {
35
-
const { add, outlet } =useFloatToolkit();
35
+
const { add, output } =useFloatToolkit();
36
36
37
37
useEffect(() => {
38
38
add([x, y]);
39
39
}, [x, y]);
40
40
41
-
return<span className="number">{outlet}</span>;
41
+
return<span className="number">{output}</span>;
42
42
}
43
43
```
44
44
@@ -53,22 +53,22 @@ Just like its parent package, Float Toolkit for React is written in [TypeScript]
0 commit comments