Comparing version 0.5.1 to 0.5.2
@@ -42,7 +42,3 @@ import { FC } from 'react'; | ||
declare function shared<M>(target: (new (init?: any) => M) | ((init?: any) => M)): M; | ||
declare const useScoped: <M>(target: (new (init?: any) => M | { | ||
0: () => M; | ||
} | [() => M] | (() => M)) | ((init?: any) => M | { | ||
0: () => M; | ||
} | [() => M] | (() => M))) => M; | ||
declare function useScoped<M>(target: (new (init?: any) => M | Reactionable<M>) | ((init?: any) => M | Reactionable<M>)): M; | ||
declare const Scope: FC; | ||
@@ -49,0 +45,0 @@ declare function observe<T extends FC>(FunctionComponent: T): T; |
@@ -184,3 +184,3 @@ "use strict"; | ||
} | ||
const useScoped = (target) => { | ||
function useScoped(target) { | ||
const context_data = useContext(get_scope_context()); | ||
@@ -201,4 +201,5 @@ if (!context_data) { | ||
return useValue(instance); | ||
}; | ||
} | ||
exports.useScoped = useScoped; | ||
; | ||
const Scope = ({ children }) => { | ||
@@ -205,0 +206,0 @@ const h = useMemo(() => [new Map(), []], []); |
{ | ||
"name": "realar", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "React state manager", | ||
@@ -88,3 +88,3 @@ "repository": { | ||
}, | ||
"gitHead": "2e9dddbad076f15f7cb3b0f65a1444d6381a77aa" | ||
"gitHead": "8583f65836ca49aa79e31b47d4f3769e98457f9f" | ||
} |
@@ -42,3 +42,3 @@ # Realar | ||
- __Actions__ are a necessary part of reactive communication, well knows for most javascript developers. In Realar that possibility provides through signal abstraction. Possibility for subscribing to signal, call signal and wait for the next signal value everywhere on the codebase. And for a tasty, reading the last called value from a signal. | ||
- __Signals__ are a necessary part of reactive communication, well knows for most javascript developers as actions or events. In Realar that possibility provides through signal abstraction. Possibility for subscribing to signal, call signal and wait for the next signal value everywhere on the codebase. And for a tasty, reading the last called value from a signal. | ||
@@ -45,0 +45,0 @@ |
@@ -272,7 +272,7 @@ import React, { Context, FC } from 'react'; | ||
const useScoped = <M>( | ||
function useScoped<M>( | ||
target: | ||
| (new (init?: any) => M | Reactionable<M>) | ||
| ((init?: any) => M | Reactionable<M>) | ||
): M => { | ||
): M { | ||
const context_data = useContext(get_scope_context()); | ||
@@ -279,0 +279,0 @@ if (!context_data) { |
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
46505
710