Skip to content

Commit

Permalink
chore: notes
Browse files Browse the repository at this point in the history
  • Loading branch information
cha0s committed Feb 18, 2024
1 parent be37b97 commit 7a5af74
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<RouterProvider>`.

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
Expand Down Expand Up @@ -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':
Expand Down

0 comments on commit 7a5af74

Please sign in to comment.