npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

zu-components

v1.0.0

Published

wizlong react components

Downloads

9

Readme

wiz-components

目录

概述

wiz-components是wizlong的组件库,主要存放基础组件。组件来源目前有两种,一部分是封装了Ant Design的部分组件,另外一部分是由自己封装的组件。

安装

npm install git+https://givtlab.wizlong.com/sgm/wiz-components.git

使用

    import { WizNotice,WizAlert,WizSpin } from 'wiz-components'
    
    //WizNotice[key]({ message, description });
    WizNotice.info('基本信息!');
    WizNotice.success({message:'成功了', description:'成功了!'});
    
    //WizAlert
    <WizAlert message="Success Text" type="success" />

    //WizSpin
    <WizSpin />

许可证

MIT Copyright (c) 2018 - forever Naufal Rabbani

技术栈

组件的封装

组件化是React中的重要概念,React提供了Component作为基础组件,它实现了React生命周期方法、class 属性(defaultProps、displayName)、实例属性(props、state)及其他api。wiz-components对其进行了封装,优化了一些方法及功能,它的名字叫WizComponent。

#####1. 组件名称 componentName 使用WizComponent时需要定义 component的名称。

#####2. React生命周期方法shouldComponentUpdate的封装 WizComponent对生命周期的shouldComponentUpdate方法进行了封装=>propsAndStateOnChange,优化了实例属性发生变化时的性能优化。 ######propsAndStateOnChange使用方法

    //对所需要的实例属性进行监听
    propsAndStateOnChange = {
        listen: this._listen.bind(this)
    }

    //监听方法,入参与shouldComponentUpdate的相同
    _list(nextProps,nextState){
        //do something
    }