alexa

Async Function not recognize in React.js Native ?

Async Function not recognize in React.js Native ?

Try this way

 class AppProvider extends React.Component {
  
  const functionOne = async (e) => {
    try {
      ....
    } catch (e) {
      ....
    }
  };
  
  const functionTwo = async (e) => {
    try {
      ....
    } catch (e) {
      ....
    }
  };

  render() {
    return (
      <AppContext.Provider
        value={{
          ....
          functionOne: this.functionOne,
          functionTwo: this.functionTwo,
        }}
      >
     {children}
     </AppContext.Provider>
    );
  }
}
export default AppProvider;

203 0
7

Write a Comments


* Be the first to Make Comment

GoodFirms Badge
GoodFirms Badge

Fix Your Meeting With Our SEO Consultants in India To Grow Your Business Online

Facebook
Twitter
LinkedIn
Instagram
Whatsapp
Call Now
Quick Inquiry