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

Create hook for React - Syntax error with types #14

Open
samcorcos opened this issue Dec 17, 2019 · 2 comments
Open

Create hook for React - Syntax error with types #14

samcorcos opened this issue Dec 17, 2019 · 2 comments
Assignees

Comments

@samcorcos
Copy link

I think there might be a compilation issue before it was published. I get the following when I try to run it:

SyntaxError: /Users/xxxx/code/meerkat/meerkat-web/node_modules/aws-amplify-react-hooks/src/index.js: Unexpected token (2:12)

  1 | // @flow
> 2 | import type { Node, ComponentType, Element } from 'react'
    |             ^
  3 | import React, { createContext, useEffect, useContext, useReducer } from 'react'
  4 | import _ from 'lodash'
  5 | import type { ActionT, StateT } from './types'
@gHashTag
Copy link
Member

Running in a React Native project? Which version?

@samcorcos
Copy link
Author

Ah! Good point. I just made the assumption that it was platform agnostic 😆 I'm running a React project (create-react-app generated).

@gHashTag gHashTag self-assigned this Dec 18, 2019
@gHashTag gHashTag reopened this Dec 18, 2019
@gHashTag gHashTag changed the title Syntax error with types Create hook for React - Syntax error with types Dec 18, 2019
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

2 participants