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/components/basics.mdx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,7 @@ function MyComponent() {
107
107
```
108
108
109
109
When this component is rendered into the DOM, the function body is executed.
110
-
This includes creating the `count` signal and the `console.log(count())` statement, which will log the current value of `count` to the console.
110
+
This includes creating the `count` signal and executing the `console.log(count())` statement, which will log the current value of `count` to the console.
111
111
In addition, the component's JSX is returned, which will be rendered into the DOM.
112
112
113
113
After the component is rendered, the `console.log` statement will not be executed again, even if the component's state changes.
@@ -121,7 +121,7 @@ In essence, Solid splits the concerns:
121
121
### Conditional rendering
122
122
123
123
To display different content based on state or other criteria, you can use conditional rendering.
124
-
Given that the component function is only executed once, conditional statements must be placed within the function body.
124
+
Given that the component function is only executed once, conditional statements must be placed within the return statement.
125
125
This design ensures that conditional paths are clear and immediately understood.
0 commit comments