hey! is there any way to write regular functions using useCallback hook in react

currently i'm using arrow function but want to use regular function
const myFun = useCallback((event,arg1)=>{
console.log("my func")
},[])
something like this but don't know the syntax how to write it
function myFun(event,arg1){
console.log("my func")
}
useCallback(myFun(event,arg1),[])
const myFun = useCallback((event,arg1)=>{
console.log("my func")
},[])
something like this but don't know the syntax how to write it
function myFun(event,arg1){
console.log("my func")
}
useCallback(myFun(event,arg1),[])
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server