博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[React] Refactor a Stateful List Component to a Functional Component with React PowerPlug
阅读量:7282 次
发布时间:2019-06-30

本文共 788 字,大约阅读时间需要 2 分钟。

In this lesson we'll look at React PowerPlug's <List /> component by refactoring a normal class component with state and handlers to a functional component powered by React PowerPlug.

 

import React from "react";import { render } from "react-dom";import random from "random-name";import { List } from "react-powerplug";function MyList() {  return (    
{({ list, push, pull }) => (
{
list.map(name => (
)}
);}render(
, document.getElementById("root"));

 

转载地址:http://pukjm.baihongyu.com/

你可能感兴趣的文章
***测试工具Nmap从初级到高级(转自论坛)
查看>>
JAVA 8 新特性 (值得学习)
查看>>
【Spring】- 接口代理、类代理
查看>>
Linux 磁盘分区工具 Parted
查看>>
Nginx出现413 Request Entity Too Large错误解决方法
查看>>
smarty---让smarty的初始化配置自动完成
查看>>
Ubuntu 11.10 创建桌面启动器
查看>>
tomcat报错:The server does not support version 3.0
查看>>
XML(4)——schema文件相互引用
查看>>
Linux如何查找文件及其安装路径
查看>>
以后深究。。
查看>>
细说五层网站架构
查看>>
我的友情链接
查看>>
拿nslookup查DNS信息
查看>>
在ACL下DHCP无法获得IP的解决方法
查看>>
通过dbcc page来查看SQL Server表中的数据
查看>>
给linux杀杀毒吧
查看>>
windows10序列号
查看>>
进程间的通信---信号量(semget,semctl,semop)
查看>>
基于大数据技术之电视收视率企业项目实战(hadoop+Spark)
查看>>