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

Pass function with parameters in context provider

$
0
0

I am starting on React and I am finding it difficult to implement the email and password in the context.

The example I'm following only shows no parameters.

Ty for any help

async function signIn(email: string, password: string) {        const response = await auth.signIn(email, password);    }     return (<AuthContext.Provider          value={{signed: !!user,             user: user, loading,             signIn: signIn(),             logout}}>          {children}</AuthContext.Provider>      );

Viewing all articles
Browse latest Browse all 6213

Trending Articles



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