Skip to content

k0michi/sumire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sumire

Sumire is a library for building views, on browser and server.

Example

const view = (
  <div>
    <h1>Hello</h1>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
  </div>
);

// On server
const html = Sumire.renderToString(view);
// On browser
Sumire.render(view, document.getElementById("root"));
// Different from React's render(), this just renders an element into the target.

Installation

yarn add sumire

Give the following options to @babel/plugin-transform-react-jsx.

{
  pragma: "Sumire.createElement",
  pragmaFrag: "Sumire.Fragment"
}

License

MIT License

About

Sumire is a library for building views

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published