New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@tarojsx/hooks

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

@tarojsx/hooks

Taro3 hooks

latest
Source
npmnpm
Version
0.15.0
Version published
Maintainers
1
Created
Source



👍
Taro3 Hooks



Taro3 必备的基础 React Hooks.

当前代码提交频繁, 一些特性时有变化.

License npm version npm downloads dependents PRs welcome
Built with :purple_heart: by @Colder and Contributors
:star2: :eyes: :zap: :boom:




npm i @tarojsx/hooks





用法

Hooks API 需要 React 16.8.0 及以上版本.

可以单独导入:

import useRouterParams from '@tarojsx/hooks/dist/useRouterParams'

或使用 ES6 命名导入:

import { useRouterParams } from '@tarojsx/hooks'

如果想使用 ES6 命名导入, 又不想全部打包, 推荐使用 babel-plugin-import 并在 babel.config.js 中添加以下配置:

module.exports = {
    plugins:[
        [
            'import',
            {
                libraryName: '@tarojsx/hooks',
                libraryDirectory: 'dist',
                camel2DashComponentName: false,
                transformToDefaultImport: false,
            },
            'import @tarojsx/hooks',
        ]
    ]
}

参考

支持

欢迎各种形式的支持. 至少可以给颗星 :star:

License

MIT

Keywords

taro

FAQs

Package last updated on 20 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts