react-only-when:用于条件渲染的声明性组件

时间:2021-04-27 17:26:48
【文件属性】:
文件名称:react-only-when:用于条件渲染的声明性组件
文件大小:264KB
文件格式:ZIP
更新时间:2021-04-27 17:26:48
JavaScript 仅在React时 用于条件渲染的声明性组件 安装 npm install --save react-only-when 用法 import Only from 'react-only-when' < Only xss=removed> < h1> Here I Am < / h1 > < / Only > 完整的例子 import React from 'react' ; import Only from 'react-only-when' class App extends React . Component { state = { show : true } ; toggle = ( ) => this . setState ( state => ( { show : ! state . show } ) ) ; render ( ) {
【文件预览】:
react-only-when-master
----.eslintrc(416B)
----rollup.config.js(692B)
----src()
--------.eslintrc(36B)
--------test.js(3KB)
--------index.js(2KB)
----.babelrc(138B)
----example()
--------public()
--------src()
--------README.md(103KB)
--------package-lock.json(697KB)
--------package.json(501B)
----README.md(2KB)
----.editorconfig(147B)
----.gitignore(269B)
----package-lock.json(511KB)
----package.json(2KB)

网友评论