[BUG] Error "$RefreshSig$ is not a function" if I use state in a nested component

If I define a state in nested react component I get this error: $RefreshSig$ is not a function. This bug is reproducible in latest plasmo version. Here's the code:
import { useState } from "react"

export const MainComponent = () => {
const EmailComponent = () => {
const [showTextEmailSent, setTextEmailSent] = useState(false)
return <div>{showTextEmailSent && <div>Sent Again</div>}</div>
}

return (
<div>
<EmailComponent />
<button>Send email</button>
</div>
)
}
import { useState } from "react"

export const MainComponent = () => {
const EmailComponent = () => {
const [showTextEmailSent, setTextEmailSent] = useState(false)
return <div>{showTextEmailSent && <div>Sent Again</div>}</div>
}

return (
<div>
<EmailComponent />
<button>Send email</button>
</div>
)
}
No description
1 Reply
Arcane
Arcane•4mo ago
@GorvGoyl has reached level 1. GG!
Want results from more Discord servers?
Add your server