Skip to content

Commit

Permalink
Merge branch 'main' into @patrycjakalinska/support-box-shadow
Browse files Browse the repository at this point in the history
  • Loading branch information
patrycjakalinska authored Dec 12, 2024
2 parents 6d05428 + 643f8ca commit 400f0ce
Show file tree
Hide file tree
Showing 106 changed files with 2,486 additions and 1,312 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
> Reanimated 3 is here! Check out our [documentation page](https://docs.swmansion.com/react-native-reanimated/) for more information
React Native Reanimated provides a more comprehensive,
low level abstraction for the Animated library API to be built
on top of and hence allow for much greater flexibility especially when it
comes to gesture based interactions.
low-level abstraction for the Animated library API on which to build,
allowing for much greater flexibility, especially when it comes to
gesture-based interactions.

### Nightly CI state

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"packages/react-native-reanimated",
"packages/eslint-plugin-reanimated",
"packages/react-native-reanimated/plugin",
"packages/react-native-worklets",
"apps/common-app",
"apps/paper-example",
"apps/fabric-example",
Expand Down
10 changes: 5 additions & 5 deletions packages/docs-reanimated/docs/advanced/useEvent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 4

# useEvent

`useEvent` is a low-level hook. It returns event handler that will be called when native event occurs. You can use it to create custom event handler hooks, like [`useScrollViewOffset`](/docs/scroll/useScrollViewOffset/) or [`useAnimatedScrollHandler`](/docs/scroll/useAnimatedScrollHandler/).
`useEvent` is a low-level hook. It returns an event handler that will be called when a native event occurs. You can use it to create custom event handler hooks, like [`useScrollViewOffset`](/docs/scroll/useScrollViewOffset/) or [`useAnimatedScrollHandler`](/docs/scroll/useAnimatedScrollHandler/).

## Reference

Expand Down Expand Up @@ -63,22 +63,22 @@ type EventHandlerProcessed<

#### `handler`

Function that receives event object with native payload, that can be passed to custom handler hook's worklets.
Function that receives an event object with a native payload, which can be passed to the custom handler hook's worklets.

- `event` - event object.
The payload can differ depending on the type of the event.

#### `eventNames` <Optional/>

Array of event names that will be handled by handler.
Array of event names that will be handled by the handler.

#### `rebuild` <Optional/>

Value indicating whether handler should be rebuilt.
Value indicating whether the handler should be rebuilt.

### Returns

The hook returns event handler that will be invoked when native event is dispatched. That handler may be connected to multiple components and will be invoked for each one's specific events.
The hook returns an event handler that will be invoked when a native event is dispatched. That handler may be connected to multiple components and will be invoked for each one's specific events.

## Example

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ title: useEvent
sidebar_label: useEvent
---

This is low-level hook returning event handler that will be invoked with native events, which should be used in order to create custom event handler hook like `useAnimatedGestureHandler` or `useAnimatedScrollHandler`.
This is a low-level hook returning an event handler that will be invoked with native events, which should be used in order to create custom event handler hooks, like `useAnimatedGestureHandler` or `useAnimatedScrollHandler`.

### Arguments

#### `handler` [function]

Handler will receive event object with native payload, that can be passed to custom handler hook's worklets.
Handler that will receive an event object with a native payload, which can be passed to the custom handler hook's worklets.

- `event` [object] - event object.
The payload can differ depending on the type of the event.
Expand All @@ -21,11 +21,11 @@ Array of event names that will be handled by handler.

#### `rebuilt` [boolean]

Value indicating whether handler should be rebuilt.
Value indicating whether the handler should be rebuilt.

### Returns

The hook returns event handler that will be invoked when native event is dispatched.
The hook returns an event handler that will be invoked when a native event is dispatched.

## Example

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef RCT_NEW_ARCH_ENABLED

#include <reanimated/LayoutAnimations/LayoutAnimationsProxy.h>
#include <reanimated/NativeModules/NativeReanimatedModule.h>
#include <reanimated/NativeModules/ReanimatedModuleProxy.h>

#include <react/renderer/animations/utils.h>
#include <react/renderer/mounting/ShadowViewMutation.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

namespace reanimated {

class NativeReanimatedModule;
class ReanimatedModuleProxy;

using namespace facebook;

Expand Down
Loading

0 comments on commit 400f0ce

Please sign in to comment.