Skip to content

Shared Clients#7

Merged
samuelcastro merged 4 commits intosamuelcastro:masterfrom
CarsonF:feature/shared-clients
Sep 11, 2019
Merged

Shared Clients#7
samuelcastro merged 4 commits intosamuelcastro:masterfrom
CarsonF:feature/shared-clients

Conversation

@CarsonF
Copy link
Contributor

@CarsonF CarsonF commented Sep 11, 2019

This allows using a different clients from the SDK. Fixes #5

To use:

<SplitProvider config={...}>

  <SplitClient splitKey="carson" trafficType="admin">
    <Split feature="foo">
      ...
    </Split>
  </SplitClient>

</SplitProvider>

If SplitClient is optional and if it isn't specified the default client will be used.
This works as you'd expect a React provider to work, so SplitClient can be nested and the closet parent client is used.

@CarsonF CarsonF force-pushed the feature/shared-clients branch from 3b53bf4 to 9658883 Compare September 11, 2019 17:42
@samuelcastro samuelcastro merged commit 0108f3c into samuelcastro:master Sep 11, 2019
@CarsonF CarsonF deleted the feature/shared-clients branch September 11, 2019 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow for creating new clients by key

2 participants

Comments