Skip to content

Commit

Permalink
new-example: Add reanimated babel config & patch `react-navigation-dr…
Browse files Browse the repository at this point in the history
…awer`
  • Loading branch information
StefanusChristian committed Jan 27, 2023
1 parent 4800126 commit a53153a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/exoflex/new-example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = function (api) {
},
},
],
'react-native-reanimated/plugin',
],
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff --git a/node_modules/react-navigation-drawer/lib/module/views/Drawer.js b/node_modules/react-navigation-drawer/lib/module/views/Drawer.js
index 3f81450..cf976b7 100644
--- a/node_modules/react-navigation-drawer/lib/module/views/Drawer.js
+++ b/node_modules/react-navigation-drawer/lib/module/views/Drawer.js
@@ -14,7 +14,7 @@ const {
clockRunning,
startClock,
stopClock,
- interpolate,
+ interpolateNode,
spring,
abs,
add,
@@ -331,7 +331,7 @@ export default class Drawer extends React.PureComponent {
onHandlerStateChange: this.handleTapStateChange
}, /*#__PURE__*/React.createElement(Animated.View, {
style: [styles.overlay, {
- opacity: interpolate(this.progress, {
+ opacity: interpolateNode(this.progress, {
inputRange: [PROGRESS_EPSILON, 1],
outputRange: [0, 1]
}),
diff --git a/node_modules/react-navigation-drawer/src/views/Drawer.tsx b/node_modules/react-navigation-drawer/src/views/Drawer.tsx
index cefefd8..70560e2 100644
--- a/node_modules/react-navigation-drawer/src/views/Drawer.tsx
+++ b/node_modules/react-navigation-drawer/src/views/Drawer.tsx
@@ -23,7 +23,7 @@ const {
clockRunning,
startClock,
stopClock,
- interpolate,
+ interpolateNode,
spring,
abs,
add,
@@ -548,7 +548,7 @@ export default class Drawer extends React.PureComponent<Props> {
style={[
styles.overlay,
{
- opacity: interpolate(this.progress, {
+ opacity: interpolateNode(this.progress, {
inputRange: [PROGRESS_EPSILON, 1],
outputRange: [0, 1],
}),

0 comments on commit a53153a

Please sign in to comment.