A lot of Unleash users wants to use feature toggles in their native mobile apps and single-page apps though. To meet this need we have helped multiple clients to established a Unleash-Proxy to support this need. 

The Unleash-Proxy use the official Unleash SDK to integrate with Unleash and has a simple API and will be super-fast, as it has all the data available in memory. It will also implement client specific strategies and exposes all feature toggles in the context of a specific User. 

The Unleash-Proxy uses the Unleash SDK and exposes a simple API

The Unleash-Proxy API

The Unleash-Proxy has a very simple API. It takes the Unleash Context as input and will return the feature toggles relevant for that specific context. 

Client - unleash-proxy illustration

What about single page apps?

One thing we have been facing when developing single page apps is the need for consistency while rendering. This becomes even more important when you deal with single-page apps which performs the initial rendering on the server-side and re-hydrates in the browser. In this scenario it will be crucial that the rendering on the server operates on the exact same feature flags state as the client side. Luckily there is ways to solve this and we at Unleash-hosted helps our customers in solving the best approaches for them.

If you are using the popular Next.js platform you can look at our example project on how to get started.