zoukankan      html  css  js  c++  java
  • react笔记

    static getDerivedStateFromProps(nextProps, prevState) {
    console.log('getDerivedStateFromProps',nextProps, prevState)
    }
    componentDidMount() {
    console.log('componentDidMount',this.props, this.state)
    }
    shouldComponentUpdate(nextProps, nextState) {
    console.log('shouldComponentUpdate',nextProps, nextState)
    return true
    }
    getSnapshotBeforeUpdate(prevProps, prevState){
    console.log('getSnapshotBeforeUpdate',prevProps, prevState)
    return 222
    }
    componentDidUpdate(prevProps, prevState,snapshot) {
    console.log('componentDidUpdate',prevProps, prevState,snapshot)
    }
    render(){
    return <React.Fragment>地图Component</React.Fragment>
    }
    getDerivedStateFromProps {orderId: "35201366854752"} {}
    componentDidMount {orderId: "35201366854752"} {}

    getDerivedStateFromProps {orderId: 2} {}
    shouldComponentUpdate {orderId: 2} {}
    getSnapshotBeforeUpdate {orderId: "35201366854752"}ref: (...)orderId: "35201366854752"get ref: ƒ ()proto: Object {}
    componentDidUpdate {orderId: "35201366854752"} {} 222

  • 相关阅读:
    webapi帮助文档swagger
    后台任务hangfire
    EF6 DbModelBuilder
    .net跨平台分析软件
    EF迁移命令
    NuGet Package Explorer
    ghost blog 中文资料
    IDependency自动注册autofac
    Abp zero 示例运行
    AutoMapperExtension
  • 原文地址:https://www.cnblogs.com/leee/p/12120082.html
Copyright © 2011-2022 走看看