Skip to content

Commit 748cbda

Browse files
committed
added useCallback typings; first stable version 1.0.0
1 parent 752b59d commit 748cbda

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

lib/alem-vm/alem-vm.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,20 @@ export declare function useEffect(
321321
deps?: DependencyList,
322322
): void;
323323

324+
/**
325+
* `useMemo` will only recompute the memoized value when one of the `deps` has changed.
326+
*/
324327
export declare function useMemo<T>(factory: () => T, deps: DependencyList): T;
325328

329+
/**
330+
* `useCallback` will return a memoized version of the callback that only changes if one of the `inputs`
331+
* has changed.
332+
*/
333+
export declare function useCallback<T extends Function>(
334+
callback: T,
335+
deps: DependencyList,
336+
): T;
337+
326338
type FetchOptions = {
327339
responseType?:
328340
| "arraybuffer"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "alem",
33
"description": "Create web3 applications for NEAR BOS with a focus on performance and friendly development.",
4-
"version": "1.0.0-beta.35",
4+
"version": "1.0.0",
55
"main": "main.js",
66
"types": "index.d.ts",
77
"author": "Wenderson Pires - wendersonpires.near",

0 commit comments

Comments
 (0)