From 7a5af74750e934a06b4da1265c5eceeca9aade07 Mon Sep 17 00:00:00 2001 From: cha0s Date: Sun, 18 Feb 2024 10:19:10 -0600 Subject: [PATCH] chore: notes --- docs/react.mdx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/react.mdx b/docs/react.mdx index 6e1c42a1..563d4518 100644 --- a/docs/react.mdx +++ b/docs/react.mdx @@ -111,6 +111,18 @@ This is because we have HMR support in our application! flecks provides `@flecks/react/router` which implements server and client routing using [React Router](https://reactrouter.com/en/main)'s ``. +Just add it to `flecks.yml`: + +```yml title="build/flecks.yml" +'@flecks/core': + id: react-test +'@flecks/react': {} +// highlight-next-line +'@flecks/react/router': {} +'@flecks/server': {} +'@react-test/root:./packages/root/src': {} +``` + ### Filetree routing It is possible to define your routes as a file structure. A helper is provided to build a routes @@ -173,7 +185,7 @@ exports are mixed in to the Route. Route modules should probably at least There can only be one root of your router tree. Supposing you implemented `@flecks/react/router.routes` in your fleck called `@my/routes-root`, you would set the following -configuration in `build.yml`: +configuration in `build/flecks.yml` to use your fleck's routes as the root: ```yaml '@flecks/react/router':