automatic-azure
automatic-azure8mo ago

Is there any reason to use Refine if it ends up being more code?

I trialed refine in an existing admin UI (Next.js, React Hook Form, React Query) powered by a GraphQL API. I noticed rather quickly that the code ended up being more (~2x) than I currently had for CRUD operations. I am curious if there are other reasons to use Refine aside from the CRUD components/hooks? I suppose auth but that I would rather proxy to another provider (currently using OIDC with next-auth)
2 Replies
kapa.ai
kapa.ai8mo ago
Hi @bc 🐧🪺. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Yes, there are several reasons to use Refine aside from the CRUD components/hooks. Refine is a headless React-based framework that provides a higher abstraction of functionalities like authentication, routing, client state management, and internationalization, among others. This means you can integrate external API services and Backend as a Service (BAAS) with little effort, allowing you to build scalable applications without the unnecessary overhead that comes with building applications from scratch [source (https://refine.dev/blog/building-react-admin-dashboard#why-use-refine)]. Refine also offers flexibility in your UI or business model. It comes ready-made decoupled from the UI, and mostly touches UI components via hooks. This allows you to successfully perform any business request or handle different cases. In terms of logic customization, Refine works flawlessly with react-query, so you don't have to worry about state management in your business model or when you encounter a different situation [source (https://refine.dev/blog/refine-vs-react-admin#customization-1)]. Moreover, Refine can be integrated into any REST or GraphQL backend service and includes out-of-the-box support for popular BAAS such as NestJs CRUD, Airtable, Strapi, Supabase, and others. It also comes with powerful, enterprise-grade UI frameworks: Ant Design, Material UI, Chakra UI, and Mantine which support any UI-Kit as well as custom (headless) design [source (https://refine.dev/blog/react-crud-app-airtable#why-use-refine)]. While it's true that using Refine might result in more code for CRUD operations compared to a custom solution, the benefits of using Refine come from the speed and ease of development it provides, as well as the flexibility and customization it allows. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai8mo ago
<@652386609630806017> kapa.ai is still learning and improving, please let us know how it did by reacting below