Skip to content

fix: missing .get() in useDerivedValue mock#6809

Merged
tjzel merged 2 commits intosoftware-mansion:mainfrom
kirillzyusko:fix/use-derived-value-missing-getter-in-mock
Dec 12, 2024
Merged

fix: missing .get() in useDerivedValue mock#6809
tjzel merged 2 commits intosoftware-mansion:mainfrom
kirillzyusko:fix/use-derived-value-missing-getter-in-mock

Conversation

@kirillzyusko
Copy link
Contributor

Summary

In #6312 new API with get/set methods was added.

However mock implementation wasn't updated and useDerivedValue still returns only value. This PR fixes this problem and returns getter as well.

Test plan

Run test that uses .get() on a value returned from useDerivedValue,

Copy link
Collaborator

@tjzel tjzel left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

@tjzel tjzel added this pull request to the merge queue Dec 12, 2024
Merged via the queue into software-mansion:main with commit e39d35c Dec 12, 2024
tjzel added a commit that referenced this pull request Dec 13, 2024
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect. -->

## Summary

In #6312
new API with `get`/`set` methods was added.

However mock implementation wasn't updated and `useDerivedValue` still
returns only `value`. This PR fixes this problem and returns getter as
well.

## Test plan

Run test that uses `.get()` on a value returned from `useDerivedValue`,

Co-authored-by: Tomasz Żelawski <40713406+tjzel@users.noreply.github.com>
tjzel added a commit that referenced this pull request Dec 13, 2024
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect. -->

## Summary

In #6312
new API with `get`/`set` methods was added.

However mock implementation wasn't updated and `useDerivedValue` still
returns only `value`. This PR fixes this problem and returns getter as
well.

## Test plan

Run test that uses `.get()` on a value returned from `useDerivedValue`,

Co-authored-by: Tomasz Żelawski <40713406+tjzel@users.noreply.github.com>
tjzel added a commit that referenced this pull request Dec 13, 2024
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect. -->

## Summary

In #6312
new API with `get`/`set` methods was added.

However mock implementation wasn't updated and `useDerivedValue` still
returns only `value`. This PR fixes this problem and returns getter as
well.

## Test plan

Run test that uses `.get()` on a value returned from `useDerivedValue`,

Co-authored-by: Tomasz Żelawski <40713406+tjzel@users.noreply.github.com>
r0h0gg6 pushed a commit to r0h0gg6/react-native-reanimated that referenced this pull request Jul 28, 2025
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect. -->

## Summary

In software-mansion#6312
new API with `get`/`set` methods was added.

However mock implementation wasn't updated and `useDerivedValue` still
returns only `value`. This PR fixes this problem and returns getter as
well.

## Test plan

Run test that uses `.get()` on a value returned from `useDerivedValue`,

Co-authored-by: Tomasz Żelawski <40713406+tjzel@users.noreply.github.com>
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.

2 participants