@cfcs/react
Advanced tools
Comparing version 0.0.20 to 0.0.21
import { ReactiveSubscribe, ReactiveAdapterParam } from "@cfcs/core"; | ||
import { ReactReactiveResult } from "./types"; | ||
export declare function useReactive<Instance extends ReactiveSubscribe<Record<string, any>>, State extends Record<string, any> = {}, Methods extends keyof Partial<Instance> = any, Props = any, Events extends Record<string, any> = {}>(reactiveAdapter: ReactiveAdapterParam<Instance, State, Methods, Props, Events>, props?: () => Props): ReactReactiveResult<Instance, State, Methods, Events>; | ||
import { ReactiveResult } from "./types"; | ||
export declare function useReactive<Instance extends ReactiveSubscribe<Record<string, any>>, State extends Record<string, any> = {}, Methods extends keyof Partial<Instance> = any, Props = any, Events extends Record<string, any> = {}>(reactiveAdapter: ReactiveAdapterParam<Instance, State, Methods, Props, Events>, props?: () => Props): ReactiveResult<Instance, State, Methods, Events>; |
@@ -7,3 +7,3 @@ /* | ||
repository: https://github.com/naver/cfcs | ||
version: 0.0.20 | ||
version: 0.0.21 | ||
*/ | ||
@@ -10,0 +10,0 @@ 'use strict'; |
@@ -7,3 +7,3 @@ /* | ||
repository: https://github.com/naver/cfcs | ||
version: 0.0.20 | ||
version: 0.0.21 | ||
*/ | ||
@@ -10,0 +10,0 @@ import { adaptReactive, keys, camelize } from '@cfcs/core'; |
{ | ||
"name": "@cfcs/react", | ||
"version": "0.0.20", | ||
"version": "0.0.21", | ||
"description": "Cross Framework Components", | ||
@@ -35,3 +35,3 @@ "main": "dist/cfcs.cjs.js", | ||
"dependencies": { | ||
"@cfcs/core": "~0.0.20" | ||
"@cfcs/core": "~0.0.21" | ||
}, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
import { ReactiveSubscribe, ReactiveAdapterParam, keys, camelize, adaptReactive } from "@cfcs/core"; | ||
import { useEffect, useState, useMemo } from "react"; | ||
import { ReactReactiveResult } from "./types"; | ||
import { ReactiveResult } from "./types"; | ||
@@ -15,3 +15,3 @@ | ||
props?: () => Props, | ||
): ReactReactiveResult<Instance, State, Methods, Events> { | ||
): ReactiveResult<Instance, State, Methods, Events> { | ||
const adaptResult = useMemo(() => adaptReactive(reactiveAdapter, props), []); | ||
@@ -18,0 +18,0 @@ const reactiveState = adaptResult.state(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24974
Updated@cfcs/core@~0.0.21