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

could I use it in react for a website #117

Open
eminfan opened this issue Jun 12, 2022 · 2 comments
Open

could I use it in react for a website #117

eminfan opened this issue Jun 12, 2022 · 2 comments

Comments

@eminfan
Copy link

eminfan commented Jun 12, 2022

I met an error like below
ERROR in ./~/react-native-parsed-text/src/ParsedText.js
/react-native-parsed-text/src/ParsedText.js: Unexpected token (23:21)
21 | class ParsedText extends React.Component {
22 |

23 | static displayName = 'ParsedText';
| ^
24 |
25 | static propTypes = {
26 | ...React.Text.propTypes,

@eminfan
Copy link
Author

eminfan commented Jun 12, 2022

sb told like this:
The static keyword is only for methods in ES6.

Try using const to declare the variable.

it doesn't work for me

@eminfan
Copy link
Author

eminfan commented Jun 12, 2022

when I change static to const , computer told me parsedText is not a ts file

pls help me

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

1 participant