D
D
Dima2020-08-16 17:37:16
React
Dima, 2020-08-16 17:37:16

When connecting the react-native-radial-gradient component to the project, a connection error occurs, how to solve the problem?

installed and connected according to the instructions, but when the component is imported into the project, such an error flies out, maybe someone came across this? how to decide, or if anyone knows how to do a linear-gradient, for the background property in React.

Failed to compile.

./node_modules/react-native-linear-gradient/index.android.js
SyntaxError: D:\project\gradient\node_modules\react-native-linear-gradient\index.android.js: Unexpected token, expected "," (8:36)

   6 | import { processColor, StyleSheet, View } from 'react-native';
   7 |
>  8 | import NativeLinearGradient, { type Props } from './common';
     |                                     ^
   9 |
  10 | const convertPoint = (name, point) => {
  11 |   if (Array.isArray(point)) {

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question