React component value transfer operation control.

parent component controls subcomponents to display problems through configuration items

p1.js parent component

import React, { Component } from "react";
import Child from "../child"
export default P1 extends Component {
    constructor() {
        super()
        this.state = {
           arr: [
               {
                   text:"01",
                   time:10
               },
               {
                   text:"02",
                   time:20
               }
           ]
        }
        
   //child 

//:ptime :
//: time:10state10 10~20div


export default Child extends Component {
    constructor (props) {
        super(props)
        this.state = {
            istate:true, 
            color: "gray", // 
            text:"0001"
        }
    this.show = props.options // arr
        //..
     }
     render() {
        return (
            <div style={`color:${this.state.color}`}>
                { this.state.text }              
            </div>
        );
    }
    
}

not long after watching react, I asked the great god for advice.

Mar.14,2021

your question is to provide that timer code?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3fea8-40a5b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3fea8-40a5b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?