1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

Update node.md (#1016)

Since it's much. more likely that consumers will want a Promise, Observable, or other asynchronous mechanism to listen for the flag enabled callback, add a link out to those docs. This took our team a while to find fwiw.
This commit is contained in:
Rob Levin 2021-10-11 09:39:51 -07:00 committed by GitHub
parent 8a74ad9fd5
commit d7e85c3fe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,6 +52,8 @@ Please note that in the above example we put the isEnabled-evaluation inside the
It can also be nice to notice that if you use an undefined feature toggle the Unleash SDK will return false instead of crashing your application. The SDK will also report metrics back to Unleash-hosted on feature toggle usage, which makes it \_possible to spot toggles not yet defined. And this is a very neat way to help you debug if something does not work as expected.
_Note that you can also wait until the Unleash SDK has fully syncrhonized similar to familiar "on-ready" hooks in other APIs. See [block until Unleashed is synchronized](https://github.com/Unleash/unleash-client-node#block-until-unleash-sdk-has-synchronized) for how to do this._
## Step 4: Provide the Unleash-context {#step-4-provide-the-unleash-context}
It is the client SDK that computes whether a feature toggle should be considered enabled or disabled for a specific request. This is the job of the activation strategies, which are implemented in the client SDK.