api-platform / create-client

Generate React or Vue.js-based Progressive Web Apps from an Hydra-enabled API. Also support React Native.
https://api-platform.com/docs/client-generator/
MIT License
371 stars 133 forks source link

[React] Modernize the code #331

Open alanpoulain opened 2 years ago

alanpoulain commented 2 years ago

For React generator only.

Use Context API instead of Redux. Or maybe Redux Toolkit. Use React Hook Form instead of Redux Form. Upgrade React Router. Use hooks.

dunglas commented 2 years ago

I propose to deprecate this generator in favor of the Next.js one instead. The only issue I see with Next is that it isn't compatible with React Native.

alanpoulain commented 2 years ago

Don't you think some people prefer a simple React app instead of a Next.js one?

dunglas commented 2 years ago

It's harder to maintain for no real benefits IMHO. People with specific needs can create and maintain they own templates.

J3m5 commented 6 months ago

I'd suggest reconsidering the decision to deprecate the React generator.

In 2024, Next installations account for around 25% of total React installations. https://npmtrends.com/@vitejs/plugin-react-vs-next-vs-react

And @vite/plugin-react, for example, has 75% of Next installations.

The majority of developers still use React without Next.

dunglas commented 6 months ago

As long as both are maintained, why not, but that's not the case at present, and no one has volunteered to maintain the non-Next variant.