@@ -89,6 +89,11 @@ Use `Component.make` when you want automatic tracing spans, or
|
|||||||
`Component.makeUntraced` when you only want the component behavior. This creates
|
`Component.makeUntraced` when you only want the component behavior. This creates
|
||||||
an Effect-FC component, not a plain React component yet.
|
an Effect-FC component, not a plain React component yet.
|
||||||
|
|
||||||
|
The Effect run during render must be synchronous. Effect-FC follows React's
|
||||||
|
render model, so component bodies should produce JSX without waiting on async
|
||||||
|
work. Use lifecycle hooks, callbacks, queries, or other Effect-FC helpers for
|
||||||
|
async work that happens outside render.
|
||||||
|
|
||||||
```tsx title="src/HelloView.tsx"
|
```tsx title="src/HelloView.tsx"
|
||||||
import { Effect } from "effect"
|
import { Effect } from "effect"
|
||||||
import { Component } from "effect-fc"
|
import { Component } from "effect-fc"
|
||||||
|
|||||||
Reference in New Issue
Block a user