I found this to be good, instead. Instead of defining state (Approachapproach 1) as, example,
const initialValue = 1;
const [state,setState] = useState(initialValue)
Try this approach (Approachapproach 2),
const [state = initialValue,setState] = useState()
This resolved the re-renderrerender issue without using useEffect since we are not concerned with its internal closure approach with this case.
P.S.: If you are concerned with using old state for any use case then useState with useEffect needs to be used since it will need to have that state, so approach 1 shall be used in this situation.