1.1.0 • Published 9 months ago

@open-condo/miniapp-utils v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@open-condo/miniapp-utils NPM

A set of helper functions / components / hooks used to build new condo apps fast. \ \ The purpose of this package is to take away from you the tedious code to set up and maintain common miniapp patterns, leaving your focus solely on the domain logic

Table of contents

Installation

Peer dependencies

NOTE: This package uses react / react-dom and @apollo/client as its peer dependencies, so make sure you've got ones installed.

You should have no trouble with any react version having a hooks, but we're testing on versions >=16.

Any apollo 3.x.x should be fine too, but all utils are tested on ^3.11.8

  • react / react-dom are required for /hooks/** and /components/** entry points
  • @apollo/client is required for /helpers/apollo.ts

You can skip installing them if you don't use these utilities, as each utility is built separately, but we highly recommend leaving them installed

Installing packages

Install all (NPM)

npm i @open-condo/miniapp-utils react react-dom @apollo/client

Install all (Yarn)

yarn add @open-condo/miniapp-utils react react-dom @apollo/client

Usage

You can import needed helpers / hooks / components by its name

import { isDebug, isSSR } from '@open-condo/miniapp-utils/helpers/environment'
import { usePrevious } from '@open-condo/miniapp-utils/hooks/usePrevious'
1.1.0

9 months ago

1.0.0

9 months ago