implementation of refinedev/inferencer
I just tried to implement @refinedev/inferencer into wasp but it didn't work for me(meaby because im bad in frontend), has anyone managed to do it successfully or maybe it won't work due to different routing? Any ideas?
Only idea i tried is to put rafine routing in MainPage but it have no sense.
12 Replies
Hi @grsh. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Wohooo @grsh, you just became a Waspeteer level 1!
----------------------
Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain information about the implementation of @refinedev/inferencer into Wasp. However, I can tell you that Wasp uses a top-level routing system, and for nested routing, you can use react-router source (https://discord.com/channels/686873244791210014/1203313045661548604).
For more complex routing, there are discussions about improving frontend routing in Wasp, including the use of a sub-DSL for organizing routes into hierarchies source (https://github.com/wasp-lang/wasp/issues/1072).
For more specific help, I would recommend checking the Wasp documentation or reaching out to the Wasp community.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @grsh, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
Can you share some code of your attempt so we can better understand what doesn't work for you? 😄
Hm yeah I don't know much about inferencer -> seems to be quite peculiar tool, it produces frontend code for you based on your other code? What did you try, where did you get stuck?
I tried to implement it this way
MainPage.jsx
I imitates that -> https://refine.dev/docs/core/components/inferencer/#usage
Inferencer | Refine
You can automatically generate views for your resources using @refinedev/inferencer. Inferencer exports HeadlessListInferencer, HeadlessShowInferencer, HeadlessEditInferencer, HeadlessCreateInferencer, and finally HeadlessInferencer components, the last of which combines all in one place.
I menage to make little bit by add wasp
route
remove Refine code from MainPage
add code to Refine
and AntdListInferencer
list.tsx
(this file is generated form Refine
result
i found this information about Interacer
What kind of errors do you see in the browser console? (Inspect elemnt console)
Do you see any errors in the terminal?
How does your package.json look?
For now, I used generated code to do some research and it works with WASP.
I will let you know when I dig deeper.
Thanks 🙂