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

hooks.macro

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hooks.macro - npm Package Compare versions

Comparing version 0.2.0 to 1.0.0

5

CHANGELOG.md

@@ -0,1 +1,6 @@

## v0.2.0 (December 17, 2018)
- Remove `useMutationEffect` since it is not part of React anymore (a2a5aaab7ae33907b53d6b4a11ceb53b5a4c6ad4)
- Add complete typings for both TypeScript and Flow (d725da57b40ef74fe4776f24027caf2236025beb)
## v0.1.7 (December 4, 2018)

@@ -2,0 +7,0 @@

5

package.json
{
"name": "hooks.macro",
"version": "0.2.0",
"version": "1.0.0",
"author": "Pier Paolo Ramon <ramonpierre@gmail.com>",

@@ -18,2 +18,5 @@ "main": "build/hooks.macro.js",

},
"peerDependencies": {
"react": "^16.8.0"
},
"dependencies": {

@@ -20,0 +23,0 @@ "@babel/helper-module-imports": "^7.0.0",

@@ -5,15 +5,2 @@ # Hooks’ Macro :umbrella:

> **Note:** This is using the new [React Hooks API Proposal](https://reactjs.org/docs/hooks-intro.html)
> which is subject to change until React 16.7 final.
>
> You'll need to install `react`, `react-dom`, etc at `^16.7.0-alpha.0`
>
> ```
> npm install react@next react-dom@next
> ```
>
> ```
> yarn add react@next react-dom@next
> ```
- [Features](#features)

@@ -20,0 +7,0 @@ - [Roadmap](#roadmap-)

8

src/hooks.macro.d.ts
export function useAutoMemo<T>(factory: () => T): T;
export function useAutoMemo<T>(factory: T): T;
export function useCallback<T extends (...args: any[]) => any>(callback: T): T;
export function useAutoCallback<T extends (...args: any[]) => any>(
callback: T,
): T;
type EffectCallback = () => void | (() => void);
export function useEffect(effect: EffectCallback): void;
export function useLayoutEffect(effect: EffectCallback): void;
export function useAutoEffect(effect: EffectCallback): void;
export function useAutoLayoutEffect(effect: EffectCallback): void;
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