grsh
grsh
WWasp-lang
Created by grsh on 6/21/2024 in #đŸ™‹questions
implementation of refinedev/inferencer
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 đŸ™‚
15 replies
WWasp-lang
Created by grsh on 6/21/2024 in #đŸ™‹questions
implementation of refinedev/inferencer
i found this information about Interacer
Please note that the Inferencer components are not meant to be used in production. They are meant to be used in development mode to help you generate the code for your components.
Please note that the Inferencer components are not meant to be used in production. They are meant to be used in development mode to help you generate the code for your components.
15 replies
WWasp-lang
Created by grsh on 6/21/2024 in #đŸ™‹questions
implementation of refinedev/inferencer
No description
15 replies
WWasp-lang
Created by grsh on 6/21/2024 in #đŸ™‹questions
implementation of refinedev/inferencer
I menage to make little bit by add wasp route
route ProductsRoute { path: "/products", to: ProductsPage }
page ProductsPage {
component: import { ProductsList } from "@src/pages/products/index"
}
route ProductsRoute { path: "/products", to: ProductsPage }
page ProductsPage {
component: import { ProductsList } from "@src/pages/products/index"
}
remove Refine code from MainPage
export const MainPage = () => {
return (
<div className="container">
<main>
<div>hello</div>
</main>
</div>
)
}
export const MainPage = () => {
return (
<div className="container">
<main>
<div>hello</div>
</main>
</div>
)
}
add code to Refine and AntdListInferencer list.tsx (this file is generated form Refine
import { Refine } from "@refinedev/core";
import { AntdInferencer, AntdListInferencer } from "@refinedev/inferencer/antd";
import { HeadlessListInferencer } from "@refinedev/inferencer/headless";
import { dataProvider } from "../../providers/data-provider";

const API_URL = "https://api.fake-rest.refine.dev"

export const ProductsList = () => {
return (
<Refine dataProvider={dataProvider(API_URL)}>
<AntdListInferencer />
</Refine>

);
};
import { Refine } from "@refinedev/core";
import { AntdInferencer, AntdListInferencer } from "@refinedev/inferencer/antd";
import { HeadlessListInferencer } from "@refinedev/inferencer/headless";
import { dataProvider } from "../../providers/data-provider";

const API_URL = "https://api.fake-rest.refine.dev"

export const ProductsList = () => {
return (
<Refine dataProvider={dataProvider(API_URL)}>
<AntdListInferencer />
</Refine>

);
};
15 replies
WWasp-lang
Created by grsh on 6/21/2024 in #đŸ™‹questions
implementation of refinedev/inferencer
No description
15 replies
WWasp-lang
Created by grsh on 6/21/2024 in #đŸ™‹questions
implementation of refinedev/inferencer
I tried to implement it this way
app refine_wasp2 {
wasp: {
version: "^0.13.2"
},
title: "refine_wasp2"
}

route RootRoute { path: "/", to: MainPage }
page MainPage {
component: import { MainPage } from "@src/MainPage"
}
app refine_wasp2 {
wasp: {
version: "^0.13.2"
},
title: "refine_wasp2"
}

route RootRoute { path: "/", to: MainPage }
page MainPage {
component: import { MainPage } from "@src/MainPage"
}
MainPage.jsx
import waspLogo from './waspLogo.png'
import './Main.css'
import { dataProvider } from "./providers/data-provider";
import { Refine } from "@refinedev/core";

export const MainPage = () => {
return (
<BrowserRouter>
<Refine
dataProvider={dataProvider("https://api.fake-rest.refine.dev")}
routerProvider={routerProvider}
resources={[
{
name: "products",
list: "/products",
},
]}
>
<Routes>
<Route path="/products" element={<HeadlessInferencer />} />
</Routes>
</Refine>
</BrowserRouter>
);
}
import waspLogo from './waspLogo.png'
import './Main.css'
import { dataProvider } from "./providers/data-provider";
import { Refine } from "@refinedev/core";

export const MainPage = () => {
return (
<BrowserRouter>
<Refine
dataProvider={dataProvider("https://api.fake-rest.refine.dev")}
routerProvider={routerProvider}
resources={[
{
name: "products",
list: "/products",
},
]}
>
<Routes>
<Route path="/products" element={<HeadlessInferencer />} />
</Routes>
</Refine>
</BrowserRouter>
);
}
I imitates that -> https://refine.dev/docs/core/components/inferencer/#usage
15 replies