@mindgrub/mindgrub-react
TypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

React tools

This repository contains general-purpose functions for use with React and React DOM.

The library assumes that react and react-dom are available at runtime.

The module is intended to be used with Rollup as a packaging tool, and no particular effort is made to scope the content by subject matter (beyond the dependency on React).

The library is written in TypeScript and includes type definitions.

For additional notes, see the mindgrub package.

Assumptions

This library is 99% environment agnostic. However, it is compiled with the dom lib because of one reference to window.requestAnimationFrame in withAsync.tsx. In that particular case, the same effect could probably be achieved by changing it to global.setImmediate, which does not assume a browser environment.

However, more consideration would be required before these functions could be deemed “isomorphic,” i.e. supporting server-side render. So for the moment this l ibrary makes a de facto assumption that it is used in a browser.

Code formatting

This codebase uses prettier as a formatter, and includes a Gitlab CI step to verify this on commits. If you use editor integration to get format-on-save (recommended), then no additional steps are necessary. But you can also run npm format before committing to validate.

Package Sidebar

Install

npm i @mindgrub/mindgrub-react

Weekly Downloads

1

Version

0.0.12

License

BSD-3-Clause

Unpacked Size

690 kB

Total Files

123

Last publish

Collaborators

  • gcannizzaro