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

react-aptor

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-aptor - npm Package Compare versions

Comparing version 2.0.0-alpha.1 to 2.0.0

8

esm/use-aptor.d.ts
import type { DependencyList, Ref, RefObject } from 'react';
export declare type APIGenerator = () => unknown;
export declare type GetAPI<TInstance, TParams> = (instance: TInstance | null, prams?: TParams) => APIGenerator;
export declare type Instantiate<TInstance, TElement, TParams> = (node: TElement | null, params?: TParams) => TInstance;
export declare type Destroy<TInstance, TParams> = (instance: TInstance, params?: TParams) => void;
export type APIGenerator = () => unknown;
export type GetAPI<TInstance, TParams> = (instance: TInstance | null, prams?: TParams) => APIGenerator;
export type Instantiate<TInstance, TElement, TParams> = (node: TElement | null, params?: TParams) => TInstance;
export type Destroy<TInstance, TParams> = (instance: TInstance, params?: TParams) => void;
export interface AptorConfiguration<TInstance, TElement, TParams> {

@@ -7,0 +7,0 @@ getAPI: GetAPI<TInstance, TParams>;

@@ -11,12 +11,10 @@ 'use strict';

}
var _useState = react.useState(null),
instance = _useState[0],
setInstance = _useState[1];
instance = _useState[0],
setInstance = _useState[1];
var domRef = react.useRef(null);
var instantiate = configuration.instantiate,
destroy = configuration.destroy,
getAPI = configuration.getAPI,
params = configuration.params;
destroy = configuration.destroy,
getAPI = configuration.getAPI,
params = configuration.params;
react.useEffect(function () {

@@ -23,0 +21,0 @@ var instanceReference = instantiate(domRef.current, params);

{
"name": "react-aptor",
"version": "2.0.0-alpha.1",
"version": "2.0.0",
"private": false,

@@ -5,0 +5,0 @@ "description": "React API connector",

@@ -11,5 +11,2 @@ <h1 align="center">React Aptor</h1>

<p align="center">
<a href="https://github.com/realamirhe/react-aptor/blob/master/license">
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="license" />
</a>
<a href="https://npmjs.org/package/react-aptor">

@@ -20,6 +17,9 @@ <img src="https://img.shields.io/npm/dt/react-aptor.svg" alt="downloads" />

<img src="https://img.shields.io/bundlephobia/minzip/react-aptor.svg" alt="bundle size" />
</a>
<a href="https://lgtm.com/projects/g/realamirhe/react-aptor/context:javascript">
</a>
<!-- <a href="https://lgtm.com/projects/g/realamirhe/react-aptor/context:javascript">
<img src="https://img.shields.io/lgtm/grade/javascript/g/realamirhe/react-aptor.svg?logo=lgtm&logoWidth=18" alt="Language grade: JavaScript" />
</a>
</a> -->
<a href="https://paka.dev/npm/react-aptor@latest/api">
<img src="https://paka.dev/badges/v0/cute.svg" alt="Docs" />
</a>
</p>

@@ -354,3 +354,3 @@

💻 Developer/Maintainer (**BTC**):
`bc1qq8qq63ex7svkkjdjn5axu8angfxytvs83nlujk`
`1KMz71heaNaE6myAssRH54rUKXPdbwZp5j`

@@ -362,7 +362,7 @@ 🎨 Designer (**BTC**):

![#c7589e](https://via.placeholder.com/30/c7589e/000000?text=+ '#c7589e')
![#ed5b6e](https://via.placeholder.com/30/ed5b6e/000000?text=+ '#ed5b6e')
![#f9b919](https://via.placeholder.com/30/f9b919/000000?text=+ '#f9b919')
![#26abe2](https://via.placeholder.com/30/26abe2/000000?text=+ '#26abe2')
![#129f4d](https://via.placeholder.com/30/129f4d/000000?text=+ '#129f4d')
![#c7589e](https://i.stack.imgur.com/YuJd9.png '#c7589e')
![#ed5b6e](https://i.stack.imgur.com/7ssUA.png '#ed5b6e')
![#f9b919](https://i.stack.imgur.com/31VUW.png '#f9b919')
![#26abe2](https://i.stack.imgur.com/y3o2u.png '#26abe2')
![#129f4d](https://i.stack.imgur.com/mWeRk.png '#129f4d')

@@ -369,0 +369,0 @@ ## Samples

@@ -11,12 +11,10 @@ (function (global, factory) {

}
var _useState = react.useState(null),
instance = _useState[0],
setInstance = _useState[1];
instance = _useState[0],
setInstance = _useState[1];
var domRef = react.useRef(null);
var instantiate = configuration.instantiate,
destroy = configuration.destroy,
getAPI = configuration.getAPI,
params = configuration.params;
destroy = configuration.destroy,
getAPI = configuration.getAPI,
params = configuration.params;
react.useEffect(function () {

@@ -23,0 +21,0 @@ var instanceReference = instantiate(domRef.current, params);

import type { DependencyList, Ref, RefObject } from 'react';
export declare type APIGenerator = () => unknown;
export declare type GetAPI<TInstance, TParams> = (instance: TInstance | null, prams?: TParams) => APIGenerator;
export declare type Instantiate<TInstance, TElement, TParams> = (node: TElement | null, params?: TParams) => TInstance;
export declare type Destroy<TInstance, TParams> = (instance: TInstance, params?: TParams) => void;
export type APIGenerator = () => unknown;
export type GetAPI<TInstance, TParams> = (instance: TInstance | null, prams?: TParams) => APIGenerator;
export type Instantiate<TInstance, TElement, TParams> = (node: TElement | null, params?: TParams) => TInstance;
export type Destroy<TInstance, TParams> = (instance: TInstance, params?: TParams) => void;
export interface AptorConfiguration<TInstance, TElement, TParams> {

@@ -7,0 +7,0 @@ getAPI: GetAPI<TInstance, TParams>;

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