Skip to content

Element place

Compare
Choose a tag to compare
@pakastin pakastin released this 21 Nov 12:44
· 489 commits to master since this release

You can now show/hide elements with place:

import { el, place, mount } from 'redom';

const hello = place(el('h1', 'Hello RE:DOM!'));

mount(document.body, hello); // –> <body></body>

hello.update(true); // –> <body><h1>Hello RE:DOM!</h1></body>

hello.update(false); // –> <body></body>