Skip to content

3.5.0 - allow custom fetch implementations

Choose a tag to compare

@kyle-ssg kyle-ssg released this 05 Aug 09:58
· 405 commits to main since this release

Some SSR technologies e.g. Nuxt do not provide a fetch polyfill, this means that sometimes we need to tell Flagsmith how to fetch data.

This is now possible with the following:

flagsmith.init({fetch:myCustomImplementation})

Here's an example of how this can be done with Nuxt https://github.com/Flagsmith/flagsmith-js-client/blob/main/examples/nuxt/plugins/flagsmith-plugin.ts#L10