R
Refine

ask-any-question

Data provider requests in loop when using Vite

Vvariable-lime3/20/2023
I am trying to migrate my Refine with Remix app to Vite. This app is still at the very beginning, it's just a login page and a list. I managed to integrate the auth and data providers, the login is working, the redirect for unlogged users, etc. But now I'm having a strange behavior with the list. I copied the code for the List page that was working in the remix app, but here in Vite it is loading exactly 202 times. This was code that I exported from the Inferencer. When I try to load the Inferencer directly for the list, the error is even worse, but I think the generated code is probably easier to debug. Here is a print of my devtools. I think some of these function names are sus, especially workLoop. Why is a loop calling my data provider's getList function ? How can I find out what is subscribing to what ?
No description
Kkapa.ai3/20/2023
Hey @rhengles! I'm the kapa.ai support bot. I've searched through the docs to try to answer your question. :wave:
Kkapa.ai3/20/2023
---------------------- Hmm, I don't know enough to give you a confident answer yet. However, you can refer to the refine documentation (https://refine.dev/docs) and refine blog (https://refine.dev/blog) for more information and examples on using data providers and other refine features. ----------------------
Overview | refine
What is refine?
Blog | refine
A Docusaurus powered blog!
Kkapa.ai3/20/2023
<@246421183484919808> kapa.ai is still learning and improving, please let us how it did by reacting below
Vvariable-lime3/20/2023
Just for completeness, when I use the generated code, the page loads the list 202 times, but it's faster. When I use the <HeadlessListInferencer /> directly, the page flashes during each load, making it very hard to me to wait and see if the loop eventually stops. And also it is hammering our poor backend server...
Aadverse-sapphire3/20/2023
Hey @rhengles, First, we recommend using Inferencer only in development mode. I don't understand exactly why the problem you are having. Can you provide a codesandbox environment so I can help?
Vvariable-lime3/20/2023
Thank you, I'll do that. But this is the Dev environment, I just don't have the backend to run locally Umm I'm almost done creating the sandbox, but now I can't integrate the backend because I don't have it in https, the certificate is not set up yet. I'll see if I can mock the backend... It appears I'm using the auth provider wrong, I'll fix that and see what I get
Aadverse-sapphire3/20/2023
I'm glad you found the problem. You can see the our documents to fix your auth provider. You can start here: https://refine.dev/docs/tutorial/understanding-authprovider/index/
1. Auth Provider | refine
What is auth provider?
Vvariable-lime3/20/2023
Thank you, the part that was giving me an error was because I wasn't using the useGetIdentity hook (because I didn't read the docs enough 😅 )

Looking for more? Join the community!

R
Refine

ask-any-question

Join Server
Recommended Posts
Inferencer: Translation of DataGrid Columns doesnt workHello everyone! I noticed that the Translation on all of the default pages doesnt work on the DataGRefine beginner: How to use supabase queries? In Inferencer TemplatesHello everyone, I am new to React, Refine and NextJS. I trying to build a website with my supabase dHow to Fix this broke Sider Component from V3.xxHi, I wanted to use this custom sider that I repurposed from a v3.xx app to work on a 4.xx one. I baunable to run websiteI have installed all the dependencies successfully without any error but whenever i am running commaRemove Refine WatermarkHey I am developing a University Project with Refine. I need do remove the Refine Watermark. How canHelpHey everyone. I'm developing a courier management system for my university project. Is there anyone getIdentityHi, is there a way we can update the state of our getIdentity, after updating a certain component beinferencerHi how can we pass a custom json or typed object to the inferencer to scaffold crud operationsHow can I custom resource name in Notification when create or delete successHi guys. I want to change default resource name in Notification when create or delete success.502: Bad Gateway in directus exampleHere you have error https://refine.dev/docs/examples/data-provider/directus/ in sandbox.HeyHey I have recently raised an issue on UI i wanna work on that issue can anyone help me in how I caquery data cannot be undefinedI created a new Refine app, using the Remix framework and Headless components. I tried to implementUpgraded a new project to R4 Isn t goingUpgraded a new project to R4, Isn't going too good. Need to rewrite many things.Firebase Microsoft LoginHi everyone !! I'm new to Refine. I am trying to Implement Firebase signInWithEmailAndPassword and FUse json+ld data formatHi guys 👋 !! I'm new to refine. Actually i have a API which return me data in json+ld format and iHey Ömer 5479 have yet to upgrade to v4Hey @Omer, have yet to upgrade to v4 as we're now in the process of going live with the current versHey Ömer 5479 I have also upgraded toHey @Omer, I have also upgraded to refine v4 and transition was very smooth using codemod. Any issueMake api calls to a custom endpoint and not the resource nameHi all , I currently have 4 resources : users , roles , permissions , providers . I want to update rProvide a createbuttonprops resource name when I don't it on resources.I wan't to pass a create link for create button on List component, but I don't have that resource onSwapping out CRA with Vite after using CLIHello, I tried using the CLI to create a base with CRA using v4 of refine. I then tried to swap it o