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

wappsto-blanket

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wappsto-blanket - npm Package Compare versions

Comparing version 0.0.23 to 0.0.24

6

hooks/useList.js

@@ -97,3 +97,3 @@ import { useState, useEffect, useCallback, useRef, useMemo } from 'react';

const [ customRequest, setCustomRequest ] = useState();
const [ customRequest, setCustomRequest ] = useState({ status: 'pending' });
const { request, setRequestId } = useRequest();

@@ -160,4 +160,5 @@ const name = props.name || (propsData.url + JSON.stringify(propsData.query));

if((!fetched && (!request || request.status !== 'pending')) || (fetched && request && request.status === 'error')){
dispatch(setItem(fetchedItemName, true));
refresh(props.reset);
} else {
setCustomRequest({ status: 'success' });
}

@@ -210,2 +211,3 @@ // eslint-disable-next-line react-hooks/exhaustive-deps

setCustomRequest(request);
dispatch(setItem(fetchedItemName, true));
}

@@ -212,0 +214,0 @@ }

import { useMemo, useState, useCallback } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { makeRequestSelector } from 'wappsto-redux/selectors/request';
import { makeRequest } from 'wappsto-redux/actions/request';
import { makeRequest, removeRequest } from 'wappsto-redux/actions/request';
const useRequestSelector = () => {
const dispatch = useDispatch();
const [ requestId, setRequestId ] = useState();
const getRequest = useMemo(makeRequestSelector, []);
const request = useSelector(state => getRequest(state, requestId));
const dispatch = useDispatch();
const send = useCallback((...args) => {
const newId = dispatch(makeRequest(...args));
setRequestId(newId);
return newId;
}, [dispatch]);
return { request, requestId, setRequestId, send };
const removeRequest = useCallback(() => {
dispatch(removeRequest(requestId));
}, [requestId]);
return { request, requestId, setRequestId, send, removeRequest };
}
export default useRequestSelector;
{
"name": "wappsto-blanket",
"version": "0.0.23",
"version": "0.0.24",
"description": "",

@@ -5,0 +5,0 @@ "scripts": {

@@ -167,1 +167,5 @@ import { getServiceVersion } from 'wappsto-redux/util/helpers';

}
export function getDottedText(text, num = 4, separator = ' ... ') => {
return text.slice(0,num) + separator + text.slice(-num);
}
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