npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@ur-solutions/react-hooks

v1.4.0

Published

# Changelog

Readme

Ur React Hooks

Changelog

v 1.4.0

  • Upgrade to React 19

v 1.3.0

  • useForm
    • Remove warnOnLocationChange option
      • To remove react-router-dom dependency

v 1.2.0

  • Package
    • Change package name to @ur-solutions/react-hooks

v 1.1.3

  • useClickOutside
    • Improve memoization of hook

v 1.1.2

  • useLocale
    • Add onLocaleChange event handler to useTranslateProvider
      • Fires when the useLocale.setLocale function is called

v 1.1.1

  • useForm
    • Add updateInitialValues option to updateForm function
      • Lets user update initial values immediately after updating form values

v 1.1.0

  • useTranslate
    • Add useLocale hook -Lets user retrieve current locale, and change it via setLocale function
    • Re-export useIntl from useTranslate hook
    • BREAKING: Remove locale prop from UseTranslateProvider, replaced with initialLocale
    • BREAKING: Change messages prop on UseTranslateProvider to type Record<string, Messages>, making it a map of all locales and their messages

v 1.0.1

  • useForm
    • Add onFormChange event

v 1.0.0

  • Stable release
  • Upgrade React, ReactDOM, ReactScripts, React Intl

v 0.8.0

  • Upgrade to React 18

v 0.7.10

  • useForm
    • Fix bug in updateFormValues where entire form wasn't validated

v 0.7.9

  • useForm
    • Fix bug in config.storage.transformValues callback, where previously whole state wasn't read if there was transforms present
      • (BREAKING) also fix typo: tranformValues -> transformValues
    • Fix bug in validateForm with multiple validators for a field

v 0.7.7

  • useForm
    • Improve performance of form validation
    • Add option dontUpdateFormValidForDisabled, which if set will mean formValid does not take disabled validators into account. Default false
      • Previously it didn't take these values into account, but I figured I should. That means that formErrors for disabled validators will still be null, but formValid will reflect correct validity, unless this option is set.

v 0.7.5

  • useForm
    • Fix bug when validating uncahnged field that has disabled validation

v 0.7.4

  • useForm
    • Add disableValidationInitially config param
      • Disables validation of all or given fields upon initialization
    • Add enableValidation return function
      • Enables validation of given field

v 0.7.2

  • useForm
    • Add validator arrays
      • Can now add multiple validators to field

v 0.7.0

  • useTranslate
    • Fix bug where translations didn't update on locale change

v 0.6.3

  • useGlobal
    • Add dispatcher callback to setter function
      • Can now be used like for example setNumber(v => v + 1)

v 0.6.2

  • useForm
    • Reset internal ref beenEdited on resetForm
      • To make onlyValidateAfterFirstUpdate work correctly

v 0.6.1

  • useForm
    • Fix bug when using callbacks in multiple forms

v 0.6.0

  • useGlobal
    • Adds useGlobal hook
      • It's a global store, with [value, setValue] syntax like normal state
      • Adds UseGlobalProvider for context

v 0.5.2

  • useTranslate
    • Make given arguments in callback version the defaults
      • Message 'common.age': '{age} years old' and useTranslate config age: ['common.age', { age: 21 }] with usage translations.age() gives result "21 years old"

v 0.5.0

  • Upgrade to React 17

v 0.4.9

  • useForm
    • Add storage.tranformValues to config
      • Transform values on retrieval from storage

v 0.4.8

  • useForm
    • Allow using sessionStorage for useForm-storage

v 0.4.7

  • useForm
    • Fix bug where resetForm did not use correct values

v 0.4.6

  • useForm
    • Improve resetForm
      • Now resets entire form state (errors, valid, etc. as well as values)
      • Might be breaking

v 0.4.5

  • useForm
    • Add includeValidation option to UpdateFormOptions
      • Lets user include specified keys in validation on updateForm/formChangeHandler
    • Fix error in second argument of validation functions
      • Sometimes old values would be passed
    • Fix error in validateForm function
      • formValid didn't take entire form into account

v 0.4.2

  • useTranslate
    • Make a translation version with both callback values and transformer

v 0.4.1

  • Exports
    • Make all named

v 0.4.0

  • useDebounce
    • Add hook
      • Delays the update of a value
  • TypeScript
    • Updated to 4.1.2

v 0.3.8

  • useForm
    • Add config value validateImmediately
      • Validates form immediately upon initialization

v 0.3.7

  • useTranslate
    • Add transformer message type
      • Lets you define a message of type [, (value: string) => string] to transform returned value

v 0.3.6

  • useTranslate
    • Fix error with literal type inference

v 0.3.5

  • useTranslate
    • Add support for nested translations

v 0.3.4

  • useTranslate
    • Fix bug that caused infinite updates if a JSX-element was given as argument

v 0.3.1

  • useTranslate
    • Add DefaultMessages interface
      • This can be overridden by users to get typechecking on message IDs

v 0.3.0

  • useTranslate
    • Add UseTranslateProvider component
      • A provider to be able to use the useTranslate hook

v 0.2.1

  • useForm
    • Add initAsInvalid config option
      • Lets user make formValid false on initialization

v 0.2.0

  • useForm
    • Add updateInitialValues function
      • Let's user manually set initial values

v 0.1.3

  • useForm
    • Add validation by keys to useForm validateForm function
      • Can input keys of formvalues to validate

v 0.1.2

  • useForm
    • Fix typing error in formChangeHandler

v 0.1.0

  • Initial publish