@shoutem/ui 9.0.4-rc.0 → 9.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(npm whoami:*)",
5
+ "Bash(npm config:*)"
6
+ ]
7
+ }
8
+ }
@@ -1,4 +1,4 @@
1
- import React, { useContext, useEffect, useRef } from 'react';
1
+ import React, { useCallback, useContext, useEffect, useRef } from 'react';
2
2
  import { Animated } from 'react-native';
3
3
  import { useFocusEffect } from '@react-navigation/native';
4
4
  import _ from 'lodash';
@@ -25,22 +25,17 @@ const ScrollView = ({ driver, onScroll, primary, style, ...otherProps }) => {
25
25
  // we want to switch to appropriate animation driver. We use the following hook
26
26
  // to derive the new driver and cascading styles before the actual navigation transition is done
27
27
  // to avoid rerendering when the actual nav transition completes
28
- useFocusEffect(() => {
29
- const {
30
- animationDriver: prevAnimationDriver,
31
- setAnimationDriver,
32
- } = animationDriverContext;
28
+ useFocusEffect(
29
+ useCallback(() => {
30
+ const { setAnimationDriver } = animationDriverContext;
33
31
 
34
- if (setAnimationDriver) {
35
- setAnimationDriver(animationDriver.current, primary);
36
- }
37
-
38
- return () => {
39
- if (prevAnimationDriver) {
40
- setAnimationDriver(prevAnimationDriver);
32
+ if (setAnimationDriver) {
33
+ setAnimationDriver(animationDriver.current, primary);
41
34
  }
42
- };
43
- });
35
+
36
+ // eslint-disable-next-line react-hooks/exhaustive-deps
37
+ }, []),
38
+ );
44
39
 
45
40
  useEffect(() => {
46
41
  if (driver && animationDriver.current !== driver) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shoutem/ui",
3
- "version": "9.0.4-rc.0",
3
+ "version": "9.0.5",
4
4
  "description": "Styleable set of components for React Native applications",
5
5
  "scripts": {
6
6
  "lint": "eslint .",
@@ -1,4 +0,0 @@
1
- {
2
- "editor.defaultFormatter": "dbaeumer.vscode-eslint",
3
- "editor.formatOnSave": true
4
- }