Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Improved readability #6335

Merged
merged 1 commit into from
May 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions packages/docs/src/routes/docs/(qwikcity)/action/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ created_at: '2023-03-20T23:45:13Z'

# `routeAction$()`

Actions can handle form submissions, allowing you to perform side effects such as writing to a database or sending an email.
`routeAction$()` is used to define functions called actions that execute exclusively on the server, and only when explicitly called. Actions can have side effects such as writing to a database or sending an email, that cannot happen during client-side rendering. This makes them ideal for handling form submissions, performing operations with side effects, and then returning data back to the client/browser where it can be used to update the UI.

Actions can also return data back to the client/browser, allowing you to update the UI accordingly, i.e. showing a success message after a form submission.

Actions can be declared using the `routeAction$()` or `globalAction$()` exported from `@builder.io/qwik-city`.
Actions can be declared using `routeAction$()` or `globalAction$()` exported from `@builder.io/qwik-city`.

```tsx {4,16} /useAddUser/ /firstName/#a /lastName/#b /email/#c title="src/routes/layout.tsx"
import { component$ } from '@builder.io/qwik';
Expand Down
Loading