rafaelaugustos/react-native-popup-ui

WebPack error

Opened this issue · 6 comments

Got a WebPack error when I'm importing import { Root, Popup } from 'popup-ui

C:/Users/Mk/appBeta/node_modules/popup-ui/src/basic/Popup/index.js 10:1
Module parse failed: Unexpected token (10:1)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|   static popupInstance
| 
>  static show({ ...config }) {
|               this.popupInstance.start(config)
|        }

I also have this error

Can you share with me the code or a place where i can try?

I'm copying the example from the README

import { Root, Popup } from 'popup-ui'


<Root>
    <View>
        <TouchableOpacity
            onPress={() =>
              Popup.show({
                type: 'Success',
                title: 'Upload complete',
                button: false,
                textBody: 'Congrats! Your upload successfully done',
                buttontext: 'Ok',
                callback: () => Popup.hide()
              })
            }
        >
            <Text>Open Popup</Text>
        </TouchableOpacity>
    </View>
</Root>

I installed with npm and my react-native version is:
react-native-cli: 2.0.1
react-native: 0.62.2

I am having the same error

any updates regarding this error ?
I m using expo

same problem here