React(16.8)

import React, { useState, useEffect, useContext } from "react";
/*
  导入React 
  其中牵扯了Es6的语法   解构赋值
  let {name,age,sex,friends,pet} = {name:'张三', age:18, sex:'男', friends:['王五','赵四'], pet:{style:'pig', weight: 180}}
        console.log(name)
        console.log(age)
        console.log(sex)
        console.log(friends)
        console.log(pet)
*/

你可能感兴趣的:(React(16.8))