Click in order · JavaScript and React course · Module 8: Advanced React Patterns

Introduction: Render Props structure

Arrange the Render Props pattern:

Items to click

  • useEffect(() => { fetchGalacticData().then(setData); }, []);
  • const [data, setData] = useState(null);
  • }
  • function DataProvider({ render }) {
  • return render({ data });

You can check the correct answer by solving this task in the CodeWorlds game.