Skip to content

[EXP] use useState and useEffect in content.ts #645

@iwagoro

Description

@iwagoro

What is the example you wish to see?

I want to run a function every time the value of a variable changes, but when I try to run it like
`import {useState,useEffect} from 'react'

const [data,setData] = useState("")

console.log(data)
console.log('hi')

export{},`
nothing is output to the console. How do I change the code?

Is there any context that might help us understand?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions