Is there a direct way for react parent components to pass parameters to the lowest-level child components without passing them down level by level?

is there any way for the parent component to pass parameters to the underlying child components? it does not need to be passed level by level, and it does not use readuX

.
Mar.09,2021

context learn about

give an example:


const FahterContext = React.createContext({})

//
class Father extends React.Component{
    render(){
        const value = {
            name : 'william',
            job : 'front-end engineer'
        }
        return (
            <FahterContext.Provider  value={value} >
                <Son/>
            </FahterContext.Provider >
        )
    }
}
//
class Son extends React.Component{
    render(){
        return (
            <div>
                <Grandson/>
            </div>
        )
    }
}
//
class Grandson extends React.Component{

    getProps(value){
        return (
            <div>
                name : {value.name}
                <br/>
                job : {value.job}
            </div>
        )

    }

    render(){
        return (
            <FahterContext.Consumer>
                { value => this.getProps(value) }
            </FahterContext.Consumer>
        )
    }
}

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-1e3d8ad-44733.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-1e3d8ad-44733.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?