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

dayhh-0101

v1.0.0

Published

<!-- * @Author: your name * @Date: 2021-10-12 10:26:43 * @LastEditTime: 2021-10-12 11:18:15 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: \s_1904-a_gao5_stu\day1\README.md --> ## npm:包管理工具 ## 通过np

Downloads

3

Readme

npm:包管理工具

通过npm下载全局包webpack

npm init -y 初始化webpack.json文件(包管理文件)

通过npm下载Vue到线上环境

npm i vue -S 生产环境 npm install vue --save

通过npm下载 axios到开发环境

npm i vue -D 开发环境

通过nrm切换镜像源

metrics-registry = "https://registry.npmjs.org/"

setState是同步的还是异步的?

在合成事件和钩子函数中是异步的,在原生事件、setTimeOut、interval、等原生api中是同步的

react虚拟dom是怎样实现的?

首先先说说为什使用虚拟dom,在操作真实dom时消耗性能代价太大所以在react内部中使用js 实现了一个虚拟dom结构,在操作真实dom之前,使用更好的giff算法,对虚拟dom进行比较 递归找出有变化的dom节点,然后进行其更新操作,为了实现虚拟dom我们把每个节点类型抽象成对象,每个节点类型都有自己的一个属性,也就是prop,再进行giff的时候,react会自动的去进行比较,如果节点类型不一样,那么react会直接删除该节点,然后创建新的节点插入其中,如果节点类型一样,比较prop是否有更新, 假如prop不一样,那么react会判定该节点有更新,然后重新渲染,一个接着一个往下找,直到没有子节点