Skip to content

forgojs/forgo-powertoys

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

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