react-generic-tools
v0.0.121
Published
Generic utility types, methods and components.
Readme
Project status
Use case
React utilities for simple state caching, types and testing.
Installation
You can install via package manager or simply download the compiled version as zip file here and inject:
npm install react-generic-toolsimport {useMemorizedValue, useReferenceState} from 'react-generic-tools'
// ...Testing example
import {formatEndUserTime} from 'react-generic-tools/endToEndTestHelper'
import {expect, test} from '@playwright/test'
test(
'Interval can get start and end values via harness.',
async ({page}) => {
// given
await page.goto('/')
await page.locator('.tab-bar__tap-interval').click()
// when
const now = new Date()
const formattedStartTime = formatEndUserTime(now)
// ...
}
)