New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@rhtml/hooks

Package Overview
Dependencies
Maintainers
1
Versions
138
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rhtml/hooks

Reactive HyperText Markup Language

latest
Source
npmnpm
Version
0.0.146
Version published
Weekly downloads
35
-67.59%
Maintainers
1
Weekly downloads
 
Created
Source

@rhtml/hooks

Installation

npm i @rhtml/hooks

Usage

import { LitElement, Component, html } from '@rxdi/lit-html';
import { useState } from '@rhtml/hooks';

interface MonadState { myState: boolean }

@Component({
  selector: 'r-html-view',
  template(this: RHtmlViewComponent) {
    return html`
      <r-part>
        <r-state .value=${{ myState: false }}></r-state>
        <r-render .state=${(s, setMonadState: (s: MonadState) => void) => {
          const [state$, setState, getState] = useState({ myState2: false });
          const state = getState();
          return html`
            <p>${state.myState2}</p>
            <p>${s.myState}</p>
            <button @click=${() => setState({ myState2: true })}>setHookState</button>
            <button @click=${() => setMonadState({ myState: true })}>setMonadState</button>
          `
        }}>
        </r-render>
      </r-part>
    `;
  }
})
export class RHtmlViewComponent extends LitElement {}

FAQs

Package last updated on 25 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts