Gathering detailed insights and metrics for @jhessin/react-hyperscript-helpers
Gathering detailed insights and metrics for @jhessin/react-hyperscript-helpers
Gathering detailed insights and metrics for @jhessin/react-hyperscript-helpers
Gathering detailed insights and metrics for @jhessin/react-hyperscript-helpers
Terse syntax for hyperscript using react
npm install @jhessin/react-hyperscript-helpers
Typescript
Module System
Node Version
NPM Version
71.7
Supply Chain
98.9
Quality
74.8
Maintenance
100
Vulnerability
100
License
JavaScript (81.47%)
TypeScript (18.53%)
Total Downloads
698
Last Day
2
Last Week
2
Last Month
11
Last Year
122
ISC License
51 Commits
2 Branches
1 Contributors
Updated on Feb 03, 2018
Minified
Minified + Gzipped
Latest Version
1.2.0
Package Id
@jhessin/react-hyperscript-helpers@1.2.0
Size
31.00 kB
NPM Version
3.10.10
Node Version
9.5.0
Cumulative downloads
Total Downloads
Last Day
0%
2
Compared to previous day
Last Week
0%
2
Compared to previous week
Last Month
22.2%
11
Compared to previous month
Last Year
1.7%
122
Compared to previous year
1
A library inspired by hyperscript-helpers and react-hyperscript.
Allows for expressing UIs in the hyperscript-helpers style but with first class support for React.
The api has been greatly improved, making the library usable for actual projects.
null
values when a component doesn't have any propsFor elements that have already been compiled by hh
:
1tagName(selector); 2tagName(props); 3tagName(...children); 4tagName(props, ...children); 5tagName(selector, ...children); 6tagName(selector, props, ...children);
For custom components or tags not compiled by hh
:
1import { h } from 'react-hyperscript-helpers'; 2 3h(component, selector); 4h(component, props); 5h(component, ...children); 6h(component, props, ...children); 7h(component, selector, ...children); 8h(component, selector, props, ...children);
component
is an HTML element as a string or a react function/class custom elementselector
is a string, starting with "." or "#"props
is an object of attributes (the props of the component)children
is the innerHTML text (string|boolean|number), or an array of elementsDOM components are really easy to use. Just import and go.
1import { div, h2 } from 'react-hyperscript-helpers'; 2 3export default () => div('.foo', h2('Hello, world'));
For custom components you can either create a factory function or use the h
function, similar to react-hyperscript.
1//MyComponent 2import { div, hh } from 'react-hyperscript-helpers'; 3 4export default hh(() => div('Nifty Component')); 5 6//Container 7import MyComponent from './MyComponent'; 8import SomeOtherComponent from 'who-whats-its'; 9import { div, h } from 'react-hyperscript-helpers'; 10 11export default () => div('.foo', 12 MyComponent(), 13 h(SomeOtherComponent, { foo: 'bar' }) 14);
The isRendered
property will determine whether or not a react component gets rendered.
1const Khaled = ({ display }) => ( 2 div({ isRendered: display }, 3 span('Another one'), 4 span('Another one'), 5 span('Another one'), 6 ); 7); 8 9h(Khaled, { display: false }); 10// -> null 11 12h(Khaled, { display: true }); 13/* -> 14 <div> 15 <span>Another one</span> 16 <span>Another one</span> 17 <span>Another one</span> 18 </div> 19*/
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
54 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More