For many years, web projects have used Content Management Systems (CMS) to create and manage content, store it in a database, and display it using server-side rendered programming languages. WordPress, Drupal, Joomla are well-known applications used for this purpose.
I get 2 errors when compiling the frontend. I added an Error Boundry to index.js around the provider. There are less errors but I still get the following 2 errors:
React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundry.
Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
You might have mismatching versions of React and the renderer (such as React DOM)
You might be breaking the Rules of Hooks
You might have more than one copy of React in the same app
CRUD is an essential approach wherein we can split the UI layer into two reusable piece and bring flexibility in the approach. Integrating Headless CMS with React eases the process and helps in building potential end result. I need a help in terms of Building CRUD App with React Hook- “How useState hook works? What is/are the arguments accepted by this hook and what is returned by the hook?”
@commentsBot I followed the tutorial and works fine for me. I did have an issue with the edit not saving but I then copied the code from the Github source and seemed to work fine then. There is a warning that displayed on the EditPetEntry.js file that useEffect was being imported but was not in use for that particular file. I removed the useEffect on line one and received no warning after.
As for your issue, are you sure your running the strapi backdend as well as the front end? Are you able to run a simple API call when the frontend app is running? Pretty sure the errors are due to not reaching the backend (400 errors). If not, try to solve that first. Also - for the purpose of testing CRUD without authentication, make sure your permission settings also publicly allow for create, delete, update, find, findOne.
@commentsBot This was such a cool tutorial to fast-forward my Front-end build! I really liked the useContext explanation. Goodbye Redux, hello Context!