Skip to content

forgojs/forgo-powertoys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forgo Power Toys

A set of utility functions for use in Forgo Apps.

The rerenderElement function

Renders a component mounted on an element.

import { rerenderElement } from "forgo-powertoys";

// A forgo component.
function LiveScores() {
  return {
    render(props) {
      return <p id="live-scores">Top score is {props.topscore}</p>;
    },
  };
}

// Call rerender on the element.
rerenderElement("#live-scores", { topscore: 244 });

// As needed, any time.
rerenderElement("#live-scores", { topscore: 255 });

About

Power toys for Forgo

Resources

License

Stars

Watchers

Forks

Packages

No packages published