'Unable to view Component data in ReactJs Web Application?

I have created a simple web Application with the help of Alan AI documentation for creating text to speech output.

I am unable to view the component's data after calling this API in the UseEffect hook

Please find the attached code

import './App.css';
import { useEffect } from 'react';
import alanBtn from '@alan-ai/alan-sdk-web';

const App=() =>{

useEffect(() => {
  alanBtn({
      key: '',
      onCommand: (commandData) => {
        if (commandData.command === 'go:back') {
          // Call the client code that will react to the received command
        }
      }
  });
}, []);

return(
 <div>
    <h1>Hero</h1>
 </div>
)
}

export default App;


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source