score:2

Accepted answer
function Component() {
  const [list, setList] = useState([]);

  useEffect(() => {
    import("./Assets/names/names.json").then(arrayOfNames => setList(arrayOfNames));
  }, []);

  return (
    <ul>
      {list.map(name => <li key={name}>{name}</li>)}
    </ul>
  );
}

Related Query

More Query from same tag