chore: dox

This commit is contained in:
cha0s 2024-01-08 22:58:32 -06:00
parent fd4aec4d0c
commit ff9ec5c2ae
2 changed files with 12 additions and 14 deletions

View File

@ -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. 💸 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 🧐 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 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** - 🧩 **Small but pluggable**
- The simplest application is two flecks, `core` and `server`: you don't pay for what you don't buy - 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 - Endlessly configurable through built-in [hooks](./flecks/@flecks/dox/hooks) and then your own
- 🛠️ **Ready to build real applications** - Less exposed wires (though you could always help by [submitting a pull request](https://github.com/cha0s/flecks/compare)).
- [Documentation website generator](./documentation) - 🛠️ **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/... - [Write tests](./testing), run on server/in browser/...
- [React](#todo) / [redux](#todo) - [React](#todo) / [redux](#todo)
- [Realtime sockets](./sockets) with lots of goodies like binary packing and packet dispatching - [Realtime sockets](./sockets) with lots of goodies like binary packing and packet dispatching
- [Database](./database) - [Databases](./database) using [Sequelize](https://sequelize.org/) to connect and [Docker](https://www.docker.com/) to easily persist
- [electron](#todo) - [Electron](#todo)
- [docker](#todo) - [Docker](#todo)
- [REPL](#todo) - [REPL](#todo)
- babel + Webpack 5 - babel + Webpack 5
- 👷 **Developers, developers, developers** - 👷 **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) - HMR (even on the server)
- [redux slices](https://redux-toolkit.js.org/api/createslice/) provided through hook! - Configured to get instantly up and running with a consistent path toward production
- 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.
Our shared goal—to help you quickly develop your application. We share our best practices to help you build your application right and well. Our shared goal—to help you quickly develop your application. We share our best practices to help you build your application right and well.

View File

@ -149,12 +149,11 @@ Example:
```jsx ```jsx
function Component() { function Component() {
const flecks = useFlecks(); const flecks = useFlecks();
const {socket} = flecks;
const [isConnected, setIsConnected] = useState(false); const [isConnected, setIsConnected] = useState(false);
useEvent(socket, 'connect', () => { useEvent(flecks.socket, 'connect', () => {
setIsConnected(true); setIsConnected(true);
}); });
useEvent(socket, 'disconnect', () => { useEvent(flecks.socket, 'disconnect', () => {
setIsConnected(false); setIsConnected(false);
}); });
return <p>Socket is {isConnected ? 'connected' : 'disconnected'}.</p>; return <p>Socket is {isConnected ? 'connected' : 'disconnected'}.</p>;