From ff9ec5c2ae51aa6bf009cef5200ea9853d9f1d1d Mon Sep 17 00:00:00 2001 From: cha0s Date: Mon, 8 Jan 2024 22:58:32 -0600 Subject: [PATCH] chore: dox --- website/docs/introduction.mdx | 21 ++++++++++----------- website/docs/react.mdx | 5 ++--- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/website/docs/introduction.mdx b/website/docs/introduction.mdx index a055458..213ffc1 100644 --- a/website/docs/introduction.mdx +++ b/website/docs/introduction.mdx @@ -9,7 +9,7 @@ slug: / ๐Ÿ’ธ Save time and money and don't duplicate effort. Instead, **lean on infrastructure that already exists** to solve your problems. -๐Ÿ’ฅ Ready for more? Use **advanced features** like [running flecks on your toaster](#todo) +๐Ÿ’ฅ Ready for more? Use **advanced features** like [inter-node socket communication](./sockets#intercom). ๐Ÿง Flecks is an **exceptionally-extensible fullstack application production system**. Its true purpose is to make application development a more joyful endeavor. Intelligent defaults combined with @@ -22,23 +22,22 @@ flecks is built with supreme attention to the developer and end-user experience. - ๐Ÿงฉ **Small but pluggable** - The simplest application is two flecks, `core` and `server`: you don't pay for what you don't buy - - Endlessly configurable through built-in hooks and then your own -- ๐Ÿ› ๏ธ **Ready to build real applications** - - [Documentation website generator](./documentation) + - Endlessly configurable through built-in [hooks](./flecks/@flecks/dox/hooks) and then your own + - Less exposed wires (though you could always help by [submitting a pull request](https://github.com/cha0s/flecks/compare)). +- ๐Ÿ› ๏ธ **Ready to build maintainable and performant production applications** + - [Documentation website](./documentation) generation for your project with no fuss - [Write tests](./testing), run on server/in browser/... - [React](#todo) / [redux](#todo) - [Realtime sockets](./sockets) with lots of goodies like binary packing and packet dispatching - - [Database](./database) - - [electron](#todo) - - [docker](#todo) + - [Databases](./database) using [Sequelize](https://sequelize.org/) to connect and [Docker](https://www.docker.com/) to easily persist + - [Electron](#todo) + - [Docker](#todo) - [REPL](#todo) - babel + Webpack 5 - ๐Ÿ‘ท **Developers, developers, developers** - - ๐Ÿช„ Easy to create a fleck; no need to publish packages or use voodoo + - Easy to create a fleck; no need to publish packages or use voodoo - HMR (even on the server) - - [redux slices](https://redux-toolkit.js.org/api/createslice/) provided through hook! - - Easily spin up a database or redis server ([or...](/docs/flecks/@flecks/dox/hooks#flecksdockercontainers)) using [Docker](#todo) during development, and generate a `Dockerfile` and `docker-compose.yml` automatically for production - - Small hookable core means less exposed wires. You could always help by [submitting a pull request](https://github.com/cha0s/flecks/compare) though. + - Configured to get instantly up and running with a consistent path toward production Our shared goalโ€”to help you quickly develop your application. We share our best practices to help you build your application right and well. diff --git a/website/docs/react.mdx b/website/docs/react.mdx index 8997c3c..ef0de48 100644 --- a/website/docs/react.mdx +++ b/website/docs/react.mdx @@ -149,12 +149,11 @@ Example: ```jsx function Component() { const flecks = useFlecks(); - const {socket} = flecks; const [isConnected, setIsConnected] = useState(false); - useEvent(socket, 'connect', () => { + useEvent(flecks.socket, 'connect', () => { setIsConnected(true); }); - useEvent(socket, 'disconnect', () => { + useEvent(flecks.socket, 'disconnect', () => { setIsConnected(false); }); return

Socket is {isConnected ? 'connected' : 'disconnected'}.

;