![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
React
等不到你.
四格缩进
展开
-
React 组件,自动渲染文本中的 Url
import React from 'react';// 渲染 text 中的 url 为超链接export default class RenderTextUrl extends React.Component { render() { let result_array = []; const if_sep = c => ',,、。 []\n'.indexOf(c) === -1; for (let c of this.props.text) { if原创 2021-09-18 18:11:20 · 391 阅读 · 0 评论 -
React 官网入门教程 - 井字棋小游戏
刚刚开始学习 React,跟着官网的小教程做了一遍,还做了一些代码的精简和修改官网教程地址:点击跳转到官网最终效果:import React from 'react'import ReactDOM from 'react-dom'import './index.css'const Square = props => <button className="square" onClick={props.onClick} >{props.value}</button&g.原创 2020-12-18 16:58:40 · 430 阅读 · 1 评论