Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
saeedek opened this issue Jun 16, 2020 · 5 comments
Open

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

saeedek opened this issue Jun 16, 2020 · 5 comments

Comments

@saeedek
Copy link

saeedek commented Jun 16, 2020

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,
@ghazalcomputer
Copy link

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,

@ehdwns980416
Copy link

+1

@SamiYousef
Copy link

already have the same issue.
any support, please

@ghost
Copy link

ghost commented Oct 17, 2020

Same here

@ghazalcomputer
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants