Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Is there any way to combine useContext with an arrow function?

$
0
0

I'd like to use the useContext and createContext with an arrow function. I want to be able to use variables inside Foo and pass them in createContext.

export const Foo = () => {...}

Combine above and below.

export const Bar = React.createContext({ lang: 'en'})

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>