Create Basic React Functional Component
Categories: Programming & Development Code Generation & Debugging Web & App Development (Primary)
Generate the boilerplate code for a functional React component named '[ComponentName]' using hooks (useState, useEffect). The component should fetch data from the API endpoint '[API_Endpoint]' on mount and display a loading state while fetching, then display the data or an error message.
You can edit the prompt before copy
If you share the link prompt will be shared without your changes