Skip to content

Commit c228e18

Browse files
winjeysongatilafassina
authored andcommitted
fix: wrong Dynamic import statement
1 parent b5cf127 commit c228e18

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/routes/concepts/control-flow/dynamic.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ order: 2
77
By passing either a string representing a [native HTML element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) or a component function to the `component` prop, you can render the chosen component with the remaining props you provide.
88

99
```jsx
10-
import { createSignal, Dynamic, For } from "solid-js"
10+
import { createSignal, For } from "solid-js"
11+
import { Dynamic } from "solid-js/web"
1112

1213
const RedDiv = () => <div style="color: red">Red</div>
1314
const GreenDiv = () => <div style="color: green">Green</div>
@@ -91,11 +92,11 @@ When working with these components, you can pass [props](/concepts/components/pr
9192
This makes them available to the component you are rendering, similar to how you would pass props to components in JSX.
9293

9394
```jsx
94-
import { Dynamic } from "solid-js"
95+
import { Dynamic } from "solid-js/web"
9596

9697
function App() {
9798
return (
9899
<Dynamic component={someComponent} someProp="someValue" />
99100
)
100101
}
101-
```
102+
```

0 commit comments

Comments
 (0)