幻灯片左右滑动的时候出现notice, waring

来源:9-4 轮播图 上

火柴锅

2020-05-06

图片描述

每当我左右滑动一下图片,就出现这条提示:
%s: Calling getNode() on the ref of an Animated component is no longer necessary. You can now directly use the ref instead. This method will be removed in a future release. FlatList

// package.json
{
  "name": "ximalaya",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint . --ext .js,.jsx,.ts,.tsx"
  },
  "dependencies": {
    "@react-native-community/masked-view": "^0.1.10",
    "@react-navigation/bottom-tabs": "^5.3.1",
    "@react-navigation/material-top-tabs": "^5.1.14",
    "@react-navigation/native": "^5.1.7",
    "@react-navigation/stack": "^5.2.14",
    "dva-core-ts": "^2.0.7",
    "dva-loading-ts": "^3.0.23",
    "react": "16.11.0",
    "react-native": "0.62.2",
    "react-native-config": "^1.0.0",
    "react-native-gesture-handler": "^1.6.1",
    "react-native-reanimated": "^1.8.0",
    "react-native-safe-area-context": "^0.7.3",
    "react-native-screens": "^2.7.0",
    "react-native-snap-carousel": "^3.9.0",
    "react-native-svg": "^12.1.0",
    "react-native-tab-view": "^2.14.0",
    "react-redux": "^7.2.0"
  },
  "devDependencies": {
    "@babel/core": "^7.6.2",
    "@babel/runtime": "^7.6.2",
    "@react-native-community/eslint-config": "^1.0.0",
    "@types/jest": "^24.0.24",
    "@types/react-native": "^0.62.0",
    "@types/react-native-snap-carousel": "^3.8.1",
    "@types/react-redux": "^7.1.7",
    "@types/react-test-renderer": "16.9.2",
    "@typescript-eslint/eslint-plugin": "^2.27.0",
    "@typescript-eslint/parser": "^2.27.0",
    "babel-jest": "^24.9.0",
    "babel-plugin-module-resolver": "^4.0.0",
    "eslint": "^6.5.1",
    "jest": "^24.9.0",
    "metro-react-native-babel-preset": "^0.58.0",
    "prettier": "^2.0.4",
    "react-native-iconfont-cli": "^2.0.0",
    "react-test-renderer": "16.11.0",
    "typescript": "^3.8.3"
  },
  "jest": {
    "preset": "react-native",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ]
  }
}

写回答

1回答

今朝

2020-05-07

https://stackoverflow.com/questions/60910385/upgraded-to-react-native-0-62-0-getting-warning-sign-calling-getnode-on-t

这里也有一个和你这个问题一样的讨论。getNode函数在react native 0.62版本中被弃用了。可能需要等react-native-snap-carousel组件更新了。

0
1
火柴锅
非常感谢!
2020-05-08
共1条回复

跨平台应用ReactNative+TypeScript仿喜马拉雅开发App

从入门到实战,掌握用TypeScript开发ReactNative应用

832 学习 · 339 问题

查看课程