New version of ic-use-internet-identity published, v0.2.0

useInternetIdentity is a hook that makes it easy to integrate Internet Identity into your React application. It provides a simple interface for logging in and out with the Internet Identity service. In addition to the login functionality, the hook also provides login status updates for nice responsive UIs: LoginStatus = "error" | "logging-in" | "success" | "idle"

A new version is now available that fixes a bug that caused caching issues when switching between identities within the same app. This new version uses xstate/store for state management instead of React Context. If you have been struggling with unpredictable React state updates, this is the solution. Such a nice, tiny library!

The hook interface remains unchanged from previous versions so upgrades should be straight forward.

Also…

Check out the demo application. The easiest way to get started with an IC app with II login is to fork the demo app.

Live demo: https://x2jdf-giaaa-aaaal-qc66a-cai.icp0.io

2 Likes