Files
Satoshi Qazi Muhammed a909c0709b Elapsed: run the shared clock only while an Elapsed is mounted
tick() was called when the module loaded and re-armed itself every
100ms forever, on every page whether or not any Elapsed was shown. In a
test process it is the timer that never let Node exit: the Modal and
Popup specs finished in 3s and then hung until killed (the only live
timer left was Elapsed.tsx:32, traced by recording timer creation).

The first Elapsed to mount starts the clock; it stops on the next tick
after the last one unmounts.
2026-10-10 07:38:07 +04:00
..

@pezkuwi/react-query

WARNING: This is an internal package to pezkuwichain/pezkuwi-apps so is not intended (yet) for broad use. Since these are generic components, they will move to the pezkuwichain/pezkuwi-ui repo once deemed stable and usable.

For the existing sharable components usable in external React-based projects, take a look at the pezkuwichain/pezkuwi-ui documentation

Overview

A collection of RxJS enabled React components that operate with the @pezkuwi/api-rx library. It automatically manages subscriptions on behalf of the developer, providing a number of unstyled components that can be used to construct UIs.

Usage

Basic usage entails creating a ContextProvider and just using the components. For instance, to display the current node time,

import React from 'react';
import ReactDOM from 'react-dom';

import { Api, NodeTime } from '@pezkuwi/react-query';

...
ReactDOM.render(
  <Api>
    <NodeTime />
  </Api>,
  document.querySelector('#container')
);
...

All components are provided unstyled making no assumptions on the actual use, however they all support (optionally) the label, className and style attributes, that can be used to style to component.

...
ReactDOM.render(
  <Api>
    <NodeTime className='rx-time' label='current node time:' />
  </Api>,
  document.querySelector('#container')
);
...