这是indexloc提供的服务,不要输入任何密码
Skip to content

React: support multiple contexts #300

@kyle-ssg

Description

@kyle-ssg

The core sdk allows you to use multiple flagsmith instances via creatFlagsmithInstance(), however the provider only allows for 1 single instance. Instead we should allow defining a "domain" as openfeature calls it.

Proposed syntax: note this suggestion adds an overload where useFlags takes an object rather than passing yet another parameter, we can keep this backwards compatible.

<FlagsmithProvider domain="a"> // since openfeature calls it a domain

useFlags({flags:[],domain:"a"})
useFlagsmith({domain:"a"})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions