赞助
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 46 下一页
摘要: 安装redux-immutable redux中利用combineReducers来合并reducer并初始化state,redux自带的combineReducers只支持state是原生js形式的,所以需要使用redux-immutable提供的combineReducers来替换原来的方法。 阅读全文
posted @ 2021-08-21 19:37 Tsunami黄嵩粟 阅读(50) 评论(0) 推荐(0)
摘要: 、immutable.js 1.1、概述 官网:https://immutable-js.github.io/immutable-js/ Immutable.js出自Facebook,是最流行的不可变数据结构的实现之一。它实现了完全的持久化数据结构,使用结构共享。所有的更新操作都会返回新的值,但是在 阅读全文
posted @ 2021-08-21 19:32 Tsunami黄嵩粟 阅读(107) 评论(0) 推荐(0)
摘要: 当VSCode升级至1.57.1(2021.6.17)时,会出现警告提示:“”message": "此项已弃用,配置默认 shell 的新推荐方法是在 `#terminal.integrated.profiles.windows# 然后我们去官网https://code.visualstudio.c 阅读全文
posted @ 2021-07-13 11:40 Tsunami黄嵩粟 阅读(5308) 评论(2) 推荐(1)
摘要: for(int a = 0; a<10 ; a++){ // c语言的循环 } for a := 0 ; a<10 ; a++ { // go语言的循环 } // for二边的括号被去掉,int声明被简化为:=,直接通过编译器右值推导获得a的变量类型并声明 // 同样if语句也是 go语言无需添加表 阅读全文
posted @ 2021-07-12 16:58 Tsunami黄嵩粟 阅读(60) 评论(0) 推荐(0)
摘要: 先给你们看下目录结构 stuendt和teacharts还有util是同级 主要是componentRegister.js文件 function changStr(str) { return str.charAt(0).toUpperCase() + str.slice(1) // charAt() 阅读全文
posted @ 2021-07-02 19:59 Tsunami黄嵩粟 阅读(653) 评论(0) 推荐(0)
摘要: Redux 提供了一个combineReducers方法,用于 Reducer 的拆分。你只要定义各个子 Reducer 函数,然后用这个方法,将它们合成一个大的 Reducer。 import { combineReducers } from 'redux'; const reducer = co 阅读全文
posted @ 2021-06-23 15:20 Tsunami黄嵩粟 阅读(100) 评论(0) 推荐(0)
摘要: # 样式 import styled from 'styled-components' const Button = styled.button` font-size: 20px; border: 1px solid red; border-radius: 3px; `; // 一个继承 Butto 阅读全文
posted @ 2021-06-23 15:18 Tsunami黄嵩粟 阅读(148) 评论(0) 推荐(0)
摘要: CSS-in-JS是一种技术,而不是一个具体的库实现。简单来说CSS-in-JS就是将应用的CSS样式写在JavaScript文件里面,而不是独立为一些css,scss或less之类的文件,这样你就可以在CSS中使用一些属于JS的诸如模块声明,变量定义,函数调用和条件判断等语言特性来提供灵活的可扩展 阅读全文
posted @ 2021-06-23 15:17 Tsunami黄嵩粟 阅读(153) 评论(0) 推荐(0)
摘要: 利用高阶组件给页面加上动画 并不想让所有的路由都有动画效果,只是想对指定的页面有路由切换效果,可以利用高阶组件来完成。 # 定义高阶组件 import React, { Component } from 'react' import { CSSTransition } from 'react-tra 阅读全文
posted @ 2021-06-23 15:15 Tsunami黄嵩粟 阅读(80) 评论(0) 推荐(0)
摘要: render() { return ( <div> <li><Link to="/home">Home</Link></li> <li><Link to="/child">Child</Link></li> <TransitionGroup> <CSSTransition timeout={1000 阅读全文
posted @ 2021-06-23 15:14 Tsunami黄嵩粟 阅读(293) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 46 下一页