sdoomz / react-google-picker

Google Picker for React
MIT License
45 stars 46 forks source link

How to import #16

Open jiachen247 opened 5 years ago

jiachen247 commented 5 years ago

import {GooglePicker} from 'react-google-picker'

does not work

joelvh commented 5 years ago

Did you look at the example? You don’t need the curly braces

jiachen247 commented 5 years ago

the demo imports using the relative path so its dosent help much.

I tried without also and it didnt work. Im using typesript.

Santrro commented 5 years ago

import GooglePicker from 'react-google-picker' should work as you have installed it as a package it will automatically resolve the path.

chitgoks commented 5 years ago

Weird. At first says Module not found: Can't resolve 'react' in '...\node_modules\react-google-picker\dist'

I uninstalled it , then installed it again and it works ok.

max-carroll commented 4 years ago

can you close this issue if this is now fixed please?