From 2f9d67940c0ce8dd9440b8e5f82c0ea65918b3ea Mon Sep 17 00:00:00 2001 From: krutoo Date: Sat, 21 Mar 2026 15:21:53 +0500 Subject: [PATCH] docs: Docs for DI and useNavigate fixes --- docs/docs/di/usage.mdx | 6 ++++-- docs/docs/react/use-navigate.mdx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/docs/di/usage.mdx b/docs/docs/di/usage.mdx index 9b0163f..1aa0ee6 100644 --- a/docs/docs/di/usage.mdx +++ b/docs/docs/di/usage.mdx @@ -59,7 +59,7 @@ export function createAppContainer() { } ``` -After it you can get components from container in any order and each container will automatically resolves its dependencies. +Finally you can get components from container in any order and each component will automatically resolves its dependencies. ```ts title="./src/index.ts" import { createAppContainer } from '#app/container'; @@ -72,4 +72,6 @@ const client = container.get(TOKEN.client); const response = await client.get('/api/user/me'); ``` -Here `response` will have type `HttpClient` because we use `TOKEN.client` to get it. +In this code `client` will automatically have type `HttpClient` because we use `TOKEN.client` to get it. + +Error will thrown if container has not bound providers for this token or some dependencies missed. diff --git a/docs/docs/react/use-navigate.mdx b/docs/docs/react/use-navigate.mdx index 47f0f2f..e8979a7 100644 --- a/docs/docs/react/use-navigate.mdx +++ b/docs/docs/react/use-navigate.mdx @@ -21,7 +21,7 @@ function App() { }; const handleBackClick = () => { - // navigating on history + // navigating over history navigate.go(-1); };