Skip to content

Conversation

@toddbaert
Copy link
Member

@toddbaert toddbaert commented Apr 2, 2024

Adds STALE pre-defined reason, re-orders reasons in source to match spec.

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@toddbaert toddbaert requested a review from a team as a code owner April 2, 2024 17:39
@toddbaert toddbaert changed the title feat: add STALE feat: add STALE pre-defined reason Apr 2, 2024
@beeme1mr
Copy link
Member

beeme1mr commented Apr 2, 2024

@toddbaert loosely related to #893

@toddbaert toddbaert added this pull request to the merge queue Apr 2, 2024
Merged via the queue into main with commit 7f4f080 Apr 2, 2024
@toddbaert toddbaert deleted the feat/add-stale branch April 2, 2024 18:19
toddbaert pushed a commit that referenced this pull request Apr 2, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.1.0](core-v1.0.0...core-v1.1.0)
(2024-04-02)


### ✨ New Features

* add STALE pre-defined reason
([#898](#898))
([7f4f080](7f4f080))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>
Signed-off-by: openfeature-peer-update-bot <openfeature-peer-update-bot@openfeature.dev>
Co-authored-by: openfeature-peer-update-bot <openfeature-peer-update-bot@openfeature.dev>
github-merge-queue bot pushed a commit that referenced this pull request Apr 3, 2024
This PR adds a new `useFlag` hook. This hook:

- returns an object supporting a react "query-style" API with relevant
properties: `const { value: newMessage, isError, reason, errorCode,
isAuthoritative, type } = useFlag('new-message', true);`
- supports ergonomic generics: 
```
const { value: boolVal }: FlagQuery<boolean> = useFlag('bool-flag', true);
const { value: stringVal }: FlagQuery<string> = useFlag('string-flag', 'string');
const { value: objVal }: FlagQuery<{greeting: string}> = useFlag('obj-flag', { greeting: 'hi' });
```
- supports all the same options and features as other hooks (suspense,
etc)

This PR fixes some type bugs as well, and adds to the readme.

DEPENDS ON: #898

---------

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Juan Bernal <juanxwtf@gmail.com>
Co-authored-by: Pete Hodgson <github@thepete.net>
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.

4 participants