-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs/document events #184
Docs/document events #184
Conversation
README.md
Outdated
## Initialize the client | ||
|
||
*NOTE*: [unleash-proxy](https://github.com/Unleash/unleash-proxy) is in maintenance moded. It is recommend to use the [Frontend API](https://docs.getunleash.io/reference/front-end-api) or [unleash-edge](https://github.com/Unleash/unleash-edge) instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing dot at the end.
README.md
Outdated
@@ -134,6 +138,39 @@ const MyComponent = ({ userId }) => { | |||
}; | |||
``` | |||
|
|||
## Listening to events | |||
|
|||
The core Javascript client will emit different types on events based on what is happening in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The core JavaScript client emits various types of events depending on internal activities. You can listen to these events by using a hook to access the client and then directly attaching event listeners. Alternatively, if you're using the FlagProvider with a client, you can directly use this client to listen to the events.
README.md
Outdated
} | ||
|
||
return () => { | ||
client.off('error', handleCallback) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be the same callback as .on() so handleError
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestions
README.md
Outdated
## Initialize the client | ||
|
||
*NOTE*: [unleash-proxy](https://github.com/Unleash/unleash-proxy) is in maintenance moded. It is recommend to use the [Frontend API](https://docs.getunleash.io/reference/front-end-api) or [unleash-edge](https://github.com/Unleash/unleash-edge) instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*NOTE*: [unleash-proxy](https://github.com/Unleash/unleash-proxy) is in maintenance moded. It is recommend to use the [Frontend API](https://docs.getunleash.io/reference/front-end-api) or [unleash-edge](https://github.com/Unleash/unleash-edge) instead | |
*NOTE*: [unleash-proxy](https://github.com/Unleash/unleash-proxy) is in maintenance mode. It is recommend to use the [Frontend API](https://docs.getunleash.io/reference/front-end-api) or [unleash-edge](https://github.com/Unleash/unleash-edge) instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put this at the start of the file and phrase it similarly to what we've done in the proxy repo:
unleash-proxy is in maintenance mode. No new features will be added and we'll only do security patches going forward. Use Unleash Edge or Frontend API instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do that, however maybe it will confuse some people to think that proxy-client-react is in maintainence mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if proxy-client is in maintenance mode, and react-proxy-client depends on proxy-client, wouldn't it make sense to have them both in maintenance mode? maybe not necessarily?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah.. This is confusing. Alle our frontend SDKs were named "Proxy-X-X" once upon a time because they were meant to be used with the Proxy. Then we developed Edge, which is the proxy successor and all of our SDKs work with Edge as well. So even though we put proxy in maintenance mode all of our consumer SDKs will still be maintained.
We should change the name of these SDKs.
README.md
Outdated
## Initialize the client | ||
|
||
*NOTE*: [unleash-proxy](https://github.com/Unleash/unleash-proxy) is in maintenance moded. It is recommend to use the [Frontend API](https://docs.getunleash.io/reference/front-end-api) or [unleash-edge](https://github.com/Unleash/unleash-edge) instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put this at the start of the file and phrase it similarly to what we've done in the proxy repo:
unleash-proxy is in maintenance mode. No new features will be added and we'll only do security patches going forward. Use Unleash Edge or Frontend API instead.
Co-authored-by: Melinda Fekete <[email protected]>
Co-authored-by: Melinda Fekete <[email protected]>
Co-authored-by: Melinda Fekete <[email protected]>
Co-authored-by: Melinda Fekete <[email protected]>
Add documentation documenting events, core library and proxy maintenance mode.