cannot consume props in functional components react hooks

1
open
anuk112
anuk112
Posted 4 months ago

cannot consume props in functional components react hooks #3789

"react-native-router-flux": "^4.2.0"

i have try to added params

Actions.Ikakoy({actives: 2})

but when i want to get the params using react hooks the value was undefined, my code is like this

......
import React, { useState, useEffect, useRef } from 'react'

const Ikakoy = (props) => {
    .........
    .........
   
    useEffect(()=>{
        console.log(props.actives) // i got undefined
        return () => { unmounted.current = true }
    },[])

    ........
}
export default Ikakoy

any solutions?

sushantb21
sushantb21
Created 1 month ago

any updates on this?