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

fix(docs): typo in qwik city -> middleware page #5446

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ contributors:
- manucorporat
- mhevery
- CoralWombat
- harishkrishnan24
---

import CodeSandbox from '../../../../components/code-sandbox/index.tsx';
Expand Down Expand Up @@ -47,7 +48,7 @@ Each middleware function is passed a [`RequestEvent`](#requestevent) object whic

## Order of invocation

The order middleware function chain is determined by their location. Starting from the topmost `layout.tsx` and ending at the `index.tsx` for a given route. (Same resolution logic as the order of layout and route component as defined by the route path.)
The order of middleware function chain is determined by their location. Starting from the topmost `layout.tsx` and ending at the `index.tsx` for a given route. (Same resolution logic as the order of layout and route component as defined by the route path.)

For example, if the request is `/api/greet/` in the following folder structure, the invocation order is as follows:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { component$, useVisibleTask$, useSignal } from '@builder.io/qwik';

export default component$(() => {
const aHref = useSignal<Element>();
useVisibleTask$(({cleanup}) => {
useVisibleTask$(({ cleanup }) => {
const handler = (event: Event) => {
event.preventDefault();
window.open('http://qwik.builder.io');
Expand Down