Product Release/28 Nov, 2022

Official React SDK release

Today we’re excited to announce the public release of the official SlashID React SDK
In this blog post we’ll go over the design pillars, main features, and why we’re thrilled about what’s coming next.


Design pillars

Built on top of our core JavaScript SDK, the React SDK provides an idiomatic way of using SlashID in React apps.

Our goal is to produce SDKs that are not only effective in solving common authentication problems, but also provide a great user & developer experience. Having analyzed hundreds of libraries in the JS ecosystem and decided what we liked & disliked about them, we set our design pillars:

Features

While the core SDK is stateless, the React SDK will keep track of authentication state for you. We provide the hook useSlashID which gives you access to the current User instance and the functions for logging in & out. Any change to the user value will make the components using the hook render again with the new value.

This hook is fundamental for the two important use cases:

This corresponds to the composability design pillar - by offering the low-level API first we empower customers to quickly and easily build their authentication UI, without interfering with their branding & design. With this foundation we can build various abstractions to take the developer experience to the next level. Our control components are a good example of the first step in that direction.

Control components

The first release of the React SDK also includes our first set of control components - <LoggedIn> and <LoggedOut>.

These components will help you conditionally render the UI based on the SDK readiness and the user authentication states. Of course that’s just the start - we’re really excited about what comes next so let’s talk about that briefly.

What’s next

Following our design pillars and especially leaning on the pillar of composability, we’ll continue building our library of control components to act as a basis for the next level - our pre-made, customizable UI components.

Our goal is to implement common authentication and session management use cases as high level UI components. Doing this while adhering to the design pillars is an interesting engineering challenge so stay tuned as we release more blog posts on this topic as we go!