Skip to content
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

Merged
merged 7 commits into from
Jan 14, 2025
Merged

Docs/document events #184

merged 7 commits into from
Jan 14, 2025

Conversation

FredrikOseberg
Copy link
Contributor

Add documentation documenting events, core library and proxy maintenance mode.

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
Copy link
Contributor

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
Copy link
Contributor

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)
Copy link
Contributor

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

Copy link
Contributor

@kwasniew kwasniew left a 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*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.

Copy link

@melindafekete melindafekete Jan 13, 2025

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.

Would it make sense to add the badge here too?
Maintenance Mode

Copy link
Contributor Author

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?

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@melindafekete

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
Copy link

@melindafekete melindafekete Jan 13, 2025

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.

Would it make sense to add the badge here too?
Maintenance Mode

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
FredrikOseberg and others added 5 commits January 14, 2025 09:57
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]>
@FredrikOseberg FredrikOseberg merged commit 4dde7bf into main Jan 14, 2025
4 checks passed
@FredrikOseberg FredrikOseberg deleted the docs/document-events branch January 14, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants