react-native-general-calendars icon indicating copy to clipboard operation
react-native-general-calendars copied to clipboard

Update on the Unexpected reserved type string (26:30) error ?

Open saeedek opened this issue 4 years ago • 5 comments

Hello I would like to know if there are any update on this issue with RN 0.62.2 ?

Thank you a lot for your package

node_modules\react-native-common\src\components\other\SegmentedControl.js: Unexpected reserved type string (26:30)

  24 |   static propTypes: {
  25 |     values: PropTypes.array,
> 26 |     selectionColor: PropTypes.string,
     |                               ^
  27 |     selectedIndex: PropTypes.number,
  28 |     onChange: PropTypes.func,
  29 |     titleStyle: PropTypes.any,

saeedek avatar Jun 16 '20 16:06 saeedek

I have the same problem. Can anyone help ???

SyntaxError: C:\Users\Mohammad\Desktop\test\node_modules\react-native-common\src\components\other\SegmentedControl.js: Unexpected reserved type string (26:30)

24 | static propTypes: { 25 | values: PropTypes.array,

26 | selectionColor: PropTypes.string, | ^ 27 | selectedIndex: PropTypes.number, 28 | onChange: PropTypes.func,

ghazalcomputer avatar Aug 02 '20 11:08 ghazalcomputer

+1

ehdwns980416 avatar Aug 10 '20 06:08 ehdwns980416

already have the same issue. any support, please

SamiYousef avatar Sep 10 '20 16:09 SamiYousef

Same here

ghost avatar Oct 17 '20 10:10 ghost

1- in vscode open \node_modules\react-native-common\src\components\other\SegmentedControl.js 2- In class SegmentedControl delete the following lines

static propTypes: { values: PropTypes.array, selectionColor: PropTypes.string, selectedIndex: PropTypes.number, onChange: PropTypes.func, titleStyle: PropTypes.any, segmentStyle: PropTypes.any, style: ViewPropTypes.style, };

3- In class Segment delete the following lines

props: { value: string; isSelected: boolean; selectionColor: string; segmentStyle?: any; titleStyle?: any; onPress: () => void; };

4- build your project

yarn build

5- Remember to redo this process every time running 'yarn install' or 'npm install' Or use https://www.npmjs.com/package/patch-package

ghazalcomputer avatar Oct 17 '20 16:10 ghazalcomputer