score:0

import './App.css';
import useApi from './useApi';

function App() {
  const movies = useApi();
  
  if (movies.length) { // conditionally render when the movie list is not empty
    return (
      <div className="App">
        {movies[0].title}
      </div>
    );
  }
  return <div>Loading...</div>   
}

export default App;

Related Query

More Query from same tag