From a98675f9b79402b4001623d8b3a38fa0953416b1 Mon Sep 17 00:00:00 2001 From: Alican Erdurmaz Date: Thu, 19 Sep 2024 17:22:20 +0300 Subject: [PATCH] feat(docs): show http-client on simple-rest usage (#6350) --- .../docs/data/packages/simple-rest/index.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/documentation/docs/data/packages/simple-rest/index.md b/documentation/docs/data/packages/simple-rest/index.md index d66d36e58638..ad7faa06ec9c 100644 --- a/documentation/docs/data/packages/simple-rest/index.md +++ b/documentation/docs/data/packages/simple-rest/index.md @@ -18,14 +18,21 @@ Simple REST package exports a function that accepts `apiUrl` and `httpClient` pa ```tsx title="app.tsx" import { Refine } from "@refinedev/core"; -// highlight-next-line +// highlight-start import dataProvider from "@refinedev/simple-rest"; +import axios from "axios"; +// highlight-end + +// highlight-start +const httpClient = axios.create(); const App = () => { return ( ")} + // highlight-start + // `httpClient` is optional. + dataProvider={(dataProvider(""), httpClient)} + // highlight-end /* ... */ /> );