careteenl / react Goto Github PK
View Code? Open in Web Editor NEW💪 Learn and copy react
License: MIT License
💪 Learn and copy react
License: MIT License
创建React动画有以下几种:
受控组件和非受控组件,是针对表单而言的。
表现形式上,react中没有添加value属性(单选按钮和复选框对应的是checked)的表单组件元素就是非受控组件
React hooks 是React 16.8 的新增特性,它的出现主要是为了解决状态逻辑复用,涉及的主要业务场景如下:
React Hooks更容易将组件的 UI 与状态分离,多个状态不会产生嵌套,写法还是平铺的(renderProps 可以通过 compose 解决,可不但使用略为繁琐,而且因为强制封装一个新对象而增加了实体数量)。
Hooks 可以引用其他 Hooks。Hook 函数必须以 "use" 命名开头,因为这样才方便 eslint 做检查,防止用 condition 判断包裹 useHook 语句。
通过改变语言状态来切换不同的语言配置文件,
例如en.json,cn.json。
解析配置文件进行渲染。
中英文字翻译,日期&时间显示习惯,数字显示(英文环境下每隔3位一个逗号),量词的显示(英文复数)等,
我们可以分别封装成这几种高阶组件,将中英文习惯做为属性传递进去,在高阶组件中做处理。如:
语言配置文件中将包含的上面几种要素用'<>'等符号包裹(借鉴模版字符串的**),例如 date: 'Today is <val, date>', message: 'I have ten <apple, plural>'。
写一个方法替换<>及其中内容为对应组件。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.