You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/routes/concepts/understanding-jsx.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ const element = <h1>I'm JSX!!</h1>;
31
31
32
32
It offers a distinct advantage, however: to copy/paste solutions from resources like Stack Overflow; and to allow direct usage of templates from design tools.
33
33
Solid sets itself apart by using JSX immediately as it returns [DOM](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction) elements.
34
-
This lets you use dynamic expressions within your HTML by allowing variables and functions to be references with the use of curly braces (`{ }`):
34
+
This lets you use dynamic expressions within your HTML by allowing variables and functions to be referenced with the use of curly braces (`{ }`):
35
35
36
36
```jsx
37
37
const Component = () => {
@@ -54,7 +54,7 @@ This updates only the necessary parts of the DOM when changes occur in the under
54
54
55
55
### Return a single root element
56
56
57
-
Where HTML lets you have disconnected tags at the top level, JSX requires that a component to return a single root element.
57
+
Where HTML lets you have disconnected tags at the top level, JSX requires that a component return a single root element.
58
58
59
59
:::advanced
60
60
When working with JSX, parts of your code are translated into structured HTML that is placed at the start of the file.
Copy file name to clipboardExpand all lines: src/routes/guides/deployment-options/zerops.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ services:
87
87
88
88
## Add zerops.yml to your repository
89
89
90
-
The `zerops.yml` configuration file is used to tell Zerops how to build and run your application, it should be placed to the root of your appplication's repository.
90
+
The `zerops.yml` configuration file is used to tell Zerops how to build and run your application, it should be placed at the root of your appplication's repository.
In the `test.jsx` file, [the `render` call from `@solidjs/testing-library`](https://testing-library.com/docs/solid-testing-library/api#render) is used to render the component and supply the props and context.
120
120
To mimic a user interaction, `@testing-library/user-event` is used.
121
-
The [`expect` function provided by `vitest`](https://vitest.dev/api/expect.html) is extended with a [`.ToHaveTextContent("content")` matcher from `@testing-library/jest-dom`](https://github.com/testing-library/jest-dom?tab=readme-ov-file#tohavetextcontent) to supply what the expected behavior is for this component.
121
+
The [`expect` function provided by `vitest`](https://vitest.dev/api/expect.html) is extended with a [`.toHaveTextContent("content")` matcher from `@testing-library/jest-dom`](https://github.com/testing-library/jest-dom?tab=readme-ov-file#tohavetextcontent) to supply what the expected behavior is for this component.
122
122
123
123
To run this test, use the following command:
124
124
@@ -211,7 +211,7 @@ If possible, try to select for accessible attributes (roughly in the following o
211
211
-**DisplayValue**: form elements showing the given value (e.g. select elements)
212
212
-**AltText**: images with alt text
213
213
-**Title**: HTML elements with the `title` attribute or SVGs with the `<title>` tag containing the given text
214
-
-**TestId**: queries by the `data-testid` attribute; a different data attribute can be setup via `configure({testIdAttribute: 'data-my-test-attribute'})`; TestId-queries are _not accessible_, so use them only as a last resort.
214
+
-**TestId**: queries by the `data-testid` attribute; a different data attribute can be set up via `configure({testIdAttribute: 'data-my-test-attribute'})`; TestId-queries are _not accessible_, so use them only as a last resort.
215
215
216
216
For more information, check the [testing-library documentation](https://testing-library.com/docs/queries/about).
Copy file name to clipboardExpand all lines: src/routes/solid-router/concepts/actions.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ In this example, an action is defined that creates a support ticket using a remo
57
57
58
58
## Using actions
59
59
60
-
Actions can be triggered in two ways: using a HTML [`<form>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/form) or programmatically using the [`useAction` primitive](/solid-router/reference/data-apis/use-action).
60
+
Actions can be triggered in two ways: using an HTML [`<form>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/form) or programmatically using the [`useAction` primitive](/solid-router/reference/data-apis/use-action).
61
61
62
62
The recommended approach is to use a `<form>` element.
63
63
This ensures a robust user experience with progressive enhancement, since the form works even without JavaScript.
@@ -97,7 +97,7 @@ function FeedbackForm() {
97
97
In this example, when the form is submitted, `submitFeedbackAction` will be triggered with the `FormData` containing the form values.
98
98
99
99
:::tip[Uploading files]
100
-
If a form that includes file inputs, the `<form>` element must have `enctype="multipart/form-data"` to correctly send the file data.
100
+
If a form includes file inputs, the `<form>` element must have `enctype="multipart/form-data"` to correctly send the file data.
@@ -280,7 +280,7 @@ To prevent this, ensure every code path in an action returns a value, such as `{
280
280
281
281
## Automatic data revalidation
282
282
283
-
After server data changes, the application's can become stale.
283
+
After server data changes, the application's data can become stale.
284
284
To solve this, Solid Router automatically revalidates all [queries](/solid-router/data-fetching/queries) used in the same page after a successful action.
285
285
This ensures any component using that data is automatically updated with the freshest information.
Copy file name to clipboardExpand all lines: src/routes/solid-router/concepts/alternative-routers.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ This includes:
25
25
## Hash mode
26
26
27
27
Hash mode routing uses the hash portion of the URL to manage an application's state and navigation.
28
-
Unlike the [default router](/solid-router/reference/components/router), the hash portion of the URL will not be handled by the server meaning this is a client-side only routing.
28
+
Unlike the [default router](/solid-router/reference/components/router), the hash portion of the URL will not be handled by the server, meaning this is a client-side only routing.
29
29
To use hash mode, replace the `<Router />` component in the application with [`<HashRouter />`](/solid-router/reference/components/hash-router).
Copy file name to clipboardExpand all lines: src/routes/solid-router/rendering-modes/ssr.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,4 +28,4 @@ import { Router } from "@solidjs/router";
28
28
<Router url={isServer ?req.url:""} />;
29
29
```
30
30
31
-
Solid Router also provides a way to define a `preload` function that loads parallel to the routes [render-as-you-fetch](https://epicreact.dev/render-as-you-fetch/).
31
+
Solid Router also provides a way to define a `preload` function that loads in parallel to the routes [render-as-you-fetch](https://epicreact.dev/render-as-you-fetch/).
0 commit comments