Sitelet https://web.archive.org/web/20201204095345/https://github.com/text-mask/text-mask/issues/984
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

I don't understand how to use it #984

Open
Eugene-boop opened this issue Nov 19, 2019 · 0 comments
Open

I don't understand how to use it #984

Eugene-boop opened this issue Nov 19, 2019 · 0 comments

Comments

@Eugene-boop
Copy link

@Eugene-boop Eugene-boop commented Nov 19, 2019

I'm a sorta newer in this field, so please don't blame for such question..
I'm trying to add this library to my project and don't really undestand why it's not working.
The next is part of my attempts:

<script src="/sitelet?url=https%3A%2F%2Funpkg.com%2Freact%4016%2Fumd%2Freact.development.js" crossorigin></script>
<script src="/sitelet?url=https%3A%2F%2Funpkg.com%2Freact-dom%4016%2Fumd%2Freact-dom.development.js" crossorigin></script>
</head>
    <body>
        <script>
        import React from 'react'
        import MaskedInput from 'react-text-mask'
        export default () => (
        <div>
            <MaskedInput
            mask={['(', /[1-9]/, /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/]}
            />
        </div>
        )
        </script>
        <div>
            <MaskedInput mask="+7 (999) 999-99-99"/>
        </div> 

That's all what connected with text-mask and ReacJS here. I used npm to download the Text-mask. Also Google Chrome's console said: "Cannot use import statement outside a module" on my "import React from 'react'". Curious where i'm stuck..

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.