没有合适的资源?快使用搜索试试~ 我知道了~
jsx-control-statements:针对React JSX的Neater If和For
共95个文件
jsx:62个
js:20个
md:3个
需积分: 17 0 下载量 86 浏览量
2021-01-30
00:21:52
上传
评论
收藏 97KB ZIP 举报
温馨提示
JSX控制语句 JSX-Control-Statements是Babel插件,它扩展了JSX以添加基本的控制语句: conditional和loops 。 它是通过将类似于组件的控制语句转换为其JavaScript对应语句来实现的,例如<If condition={condition()}>Hello World!</If>成为condition() ? 'Hello World!' : null condition() ? 'Hello World!' : null condition() ? 'Hello World!' : null 。 使用诸如Handlebars之类JavaScript模板库来使用React的开发人员通常会感到惊讶,因为它没有内置的循环或条件语法。 这是设计使然-JSX by不是模板库,它是功能性JavaScript表达式之上的声明性语法糖。 JSX Control Statements遵循相同的原理-它提供了一种类似于组件的语法,可使您的render函数保持整洁和可读性,但在干净,易读JavaScript中却存在缺点。 JSX-Control-Stat
资源推荐
资源详情
资源评论
收起资源包目录
jsx-control-statements-master.zip (95个子文件)
jsx-control-statements-master
.eslintrc.json 833B
.gitignore 1KB
package.json 1KB
src
chooseStatement.js 2KB
index.js 686B
util
error.js 2KB
conditional.js 516B
ast.js 4KB
withStatement.js 1KB
forStatement.js 2KB
ifStatement.js 1KB
.travis.yml 226B
changelog.md 2KB
wallaby.js 581B
CONTRIBUTING.md 2KB
LICENSE 1KB
components.ts 1005B
spec
testUtil.js 2KB
fixtures
choose
choose.jsx 604B
choose-with-otherwise.jsx 327B
nested-choose-no-inner-component.jsx 581B
chooses-within-if.jsx 808B
choose-empty.jsx 439B
nested-choose.jsx 873B
with
with-outer.jsx 252B
with-nested-shadowed.jsx 269B
with-outer-this.jsx 255B
with-empty-content.jsx 190B
with-string-attribute.jsx 220B
with-outer-shadowed-restored.jsx 300B
with-no-attributes.jsx 228B
with-expression-attribute.jsx 239B
with-toplevel-component.jsx 188B
with-nested-shadowed-restored.jsx 329B
with-outer-shadowed.jsx 246B
with-text-child.jsx 217B
with-unused-attribute.jsx 235B
with-element-child.jsx 219B
with-multiple-children.jsx 279B
with-multiple-attributes.jsx 268B
with-nested.jsx 280B
with-single-attribute.jsx 219B
mixed
if-inside-for.jsx 311B
for-inside-if.jsx 457B
errors
choose-with-otherwise-not-last.jsx 287B
choose-with-no-when.jsx 252B
choose-with-wrong-children.jsx 252B
when-with-no-condition.jsx 216B
if-with-non-expression-condition.jsx 223B
if-with-no-condition.jsx 206B
when-with-non-expression-condition.jsx 268B
choose-with-multiple-otherwise.jsx 311B
for-with-no-of.jsx 264B
choose-with-no-children.jsx 167B
for-with-non-expression-of.jsx 235B
for-with-non-string-each.jsx 241B
else-with-no-children.jsx 231B
for-with-non-string-index.jsx 256B
for-with-no-attributes.jsx 252B
for
for-backwards-attributes.jsx 286B
for.jsx 286B
for-without-each.jsx 203B
nested-for.jsx 352B
for-with-index-without-each.jsx 256B
for-tsx-syntax.jsx 303B
for-with-index.jsx 310B
nested-for-with-indexes.jsx 404B
for-empty.jsx 202B
if
if-empty.jsx 413B
if.jsx 471B
if-with-else.jsx 265B
nested-if.jsx 771B
extension
choose-with-multiple-children.jsx 469B
if-with-multiple-children-nested.jsx 468B
if-with-multiple-children.jsx 388B
for-with-multiple-children.jsx 308B
if-with-string-literal.jsx 271B
if-with-expression-container.jsx 279B
for-with-expression-container.jsx 250B
basic
without-any-control-statements.jsx 249B
test
if.js 3KB
error.js 4KB
with.js 5KB
extension.js 4KB
mixed.js 2KB
for.js 5KB
basic.js 400B
choose.js 5KB
tests.js 344B
README.md 16KB
jsx-control-statements.flow.js 308B
.npmignore 1KB
.editorconfig 374B
yarn.lock 100KB
index.d.ts 665B
共 95 条
- 1
资源评论
远离康斯坦丁
- 粉丝: 27
- 资源: 4664
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功