Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cfcs/react

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cfcs/react - npm Package Compare versions

Comparing version 0.0.17 to 0.0.18

2

declaration/reactive/useReactive.d.ts
import { ReactiveSubscribe, ReactiveAdapter } 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: ReactiveAdapter<Instance, State, Methods, Props, Events>): ReactReactiveResult<Instance, State, Methods, Events>;
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: ReactiveAdapter<Instance, State, Methods, Props, Events>, props?: () => Props): ReactReactiveResult<Instance, State, Methods, Events>;

@@ -7,3 +7,3 @@ /*

repository: https://github.com/naver/cfcs
version: 0.0.17
version: 0.0.18
*/

@@ -15,5 +15,5 @@ 'use strict';

function useReactive(reactiveAdapter) {
function useReactive(reactiveAdapter, props) {
var adaptResult = react.useMemo(function () {
return core.adaptReactive(reactiveAdapter);
return core.adaptReactive(reactiveAdapter, props);
}, []);

@@ -68,3 +68,3 @@ var reactiveState = adaptResult.state();

}, {});
var reactiveEvents = reactiveAdapter.events || [];
var reactiveEvents = adaptResult.events();
reactiveEvents.forEach(function (name) {

@@ -71,0 +71,0 @@ result[core.camelize("on ".concat(name))] = function (callback, dependencies) {

@@ -7,3 +7,3 @@ /*

repository: https://github.com/naver/cfcs
version: 0.0.17
version: 0.0.18
*/

@@ -13,5 +13,5 @@ import { adaptReactive, keys, camelize } from '@cfcs/core';

function useReactive(reactiveAdapter) {
function useReactive(reactiveAdapter, props) {
var adaptResult = useMemo(function () {
return adaptReactive(reactiveAdapter);
return adaptReactive(reactiveAdapter, props);
}, []);

@@ -66,3 +66,3 @@ var reactiveState = adaptResult.state();

}, {});
var reactiveEvents = reactiveAdapter.events || [];
var reactiveEvents = adaptResult.events();
reactiveEvents.forEach(function (name) {

@@ -69,0 +69,0 @@ result[camelize("on ".concat(name))] = function (callback, dependencies) {

{
"name": "@cfcs/react",
"version": "0.0.17",
"version": "0.0.18",
"description": "Cross Framework Components",

@@ -35,3 +35,3 @@ "main": "dist/cfcs.cjs.js",

"dependencies": {
"@cfcs/core": "~0.0.17"
"@cfcs/core": "~0.0.18"
},

@@ -38,0 +38,0 @@ "devDependencies": {

@@ -12,4 +12,4 @@ import { ReactiveSubscribe, ReactiveAdapter, keys, camelize, adaptReactive } from "@cfcs/core";

Events extends Record<string, any> = {},
>(reactiveAdapter: ReactiveAdapter<Instance, State, Methods, Props, Events>): ReactReactiveResult<Instance, State, Methods, Events> {
const adaptResult = useMemo(() => adaptReactive(reactiveAdapter), []);
>(reactiveAdapter: ReactiveAdapter<Instance, State, Methods, Props, Events>, props?: () => Props): ReactReactiveResult<Instance, State, Methods, Events> {
const adaptResult = useMemo(() => adaptReactive(reactiveAdapter, props), []);
const reactiveState = adaptResult.state();

@@ -67,3 +67,3 @@ const names = keys<Record<string, any>>(reactiveState);

const reactiveEvents = (reactiveAdapter.events || []);
const reactiveEvents = adaptResult.events();

@@ -70,0 +70,0 @@ reactiveEvents.forEach(name => {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc