api-platform / docs

API Platform documentation
https://api-platform.com/docs/
164 stars 1.05k forks source link

update create-client doc for react #1911

Closed 29Hido closed 4 months ago

29Hido commented 4 months ago

I tried to create a client following the current documentation and using npm init react-app -- --template typescript my-app but ran into a couple of problems.

I could not find the file src/index.tsx as in the doc but only a src/index.js I first tried to convert this file into a .tsx file but when launching the app with npm run (react-scripts start) an error occured saying Could not find a required file (index.js)

As we created the app with the parameter --template typescript I think that these modifications should not be necessary and something wrong is going on After doing the same steps with vite bundle which use the latest recommended libraries, I found out everything was going well and I had no problems setting up the application by following the current documentation

dunglas commented 4 months ago

https://github.com/api-platform/docs/pull/1911/files#diff-40f90ff67f40f9806065e8ef506ed90ba282c3ecf369b7078816715b2c3bb3a9R12 should also be updated because we don't use CRA anymore.

29Hido commented 4 months ago

https://github.com/api-platform/docs/pull/1911/files#diff-40f90ff67f40f9806065e8ef506ed90ba282c3ecf369b7078816715b2c3bb3a9R12 should also be updated because we don't use CRA anymore.

True, removed it

dunglas commented 4 months ago

Thanks!!