Skip to content

When render is called multiple times #342

@kethan

Description

@kethan

Hi, when I call render multiple times the component is attached in the dom multiple times. I have a requirement to re-render multiple times for creating custom elements.

import { render, useState } from "fre"

function App() {
  const [count, setCount] = useState(0)
  return (
    <>
      <h1>{count}</h1>
      <button onClick={() => setCount(count + 1)}>+</button>
    </>
  )
}

render(<App />, document.body)
render(<App />, document.body)
render(<App />, document.body)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions