New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rallie/vue

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rallie/vue - npm Package Compare versions

Comparing version 0.5.2 to 0.6.0

4

dist/hooks.d.ts
import { UnwrapRef } from 'vue';
import { App, Connector, State, ReadOnlyState } from 'rallie';
export declare function stateHook<T extends object>(state: State<T> | ReadOnlyState<T>): <P>(getter: (_state: T) => P) => import("vue").Ref<UnwrapRef<P>>;
import { App, Connector } from 'rallie';
export declare function stateHook<State extends object>(app: App<State> | Connector<State>): <P>(getter: (_state: State) => P) => import("vue").Ref<UnwrapRef<P>>;
export declare function eventsHook<Events>(app: App | Connector): (events: Partial<Events>) => void;
export declare function methodsHook<Methods>(app: App): (events: Partial<Methods>) => void;
import { ref, onBeforeUnmount, onBeforeMount } from 'vue';
// import { effect } from '@rallie/core'
function stateHook(state) {
function stateHook(app) {
return function (getter) {
var stateRef = ref(state.get(getter));
var unwatch = state.watch(getter).do(function (value) {
var stateRef = ref(getter(app.state));
var unwatch = app.watchState(getter).do(function (value) {
stateRef.value = value;

@@ -38,13 +37,3 @@ });

}
// export function useRallieState<P> (getter: () => P) {
// const stateRef = ref(getter())
// const runner = effect(() => {
// stateRef.value = getter() as UnwrapRef<P>
// })
// onBeforeUnmount(() => {
// runner.effect.stop()
// })
// return stateRef
// }
export { eventsHook, methodsHook, stateHook };

@@ -7,7 +7,6 @@ (function (global, factory) {

// import { effect } from '@rallie/core'
function stateHook(state) {
function stateHook(app) {
return function (getter) {
var stateRef = vue.ref(state.get(getter));
var unwatch = state.watch(getter).do(function (value) {
var stateRef = vue.ref(getter(app.state));
var unwatch = app.watchState(getter).do(function (value) {
stateRef.value = value;

@@ -43,12 +42,2 @@ });

}
// export function useRallieState<P> (getter: () => P) {
// const stateRef = ref(getter())
// const runner = effect(() => {
// stateRef.value = getter() as UnwrapRef<P>
// })
// onBeforeUnmount(() => {
// runner.effect.stop()
// })
// return stateRef
// }

@@ -55,0 +44,0 @@ exports.eventsHook = eventsHook;

{
"name": "@rallie/vue",
"version": "0.5.2",
"version": "0.6.0",
"description": "vue binding for rallie",

@@ -24,12 +24,11 @@ "author": "runnan <1608272694@qq.com>",

},
"dependencies": {
"rallie": "^0.5.2"
},
"peerDependencies": {
"rallie": ">=0.5.3",
"vue": ">=3.2.6"
},
"devDependencies": {
"@rallie/core": "^0.5.2"
"@rallie/core": "^0.6.0",
"rallie": "^0.6.0"
},
"gitHead": "1e4b57703550354bc5d2a1149a5081a4c5065b5b"
"gitHead": "8be5247aeedca969023dd6d3854b4075abc614a1"
}
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