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

How to use with React? #2

Open
DannyLines opened this issue Jan 17, 2021 · 1 comment
Open

How to use with React? #2

DannyLines opened this issue Jan 17, 2021 · 1 comment

Comments

@DannyLines
Copy link

DannyLines commented Jan 17, 2021

Hey I've tried making use of this with a react app I have, and just can't get it to work. I added /* eslint-disable */ to the start of the file to stop certain errors, however this still isn't working at all and the code below is throwing errors of:

VM2146:1 Uncaught TypeError: butter.init is not a function at <anonymous>:1:8 at Helmet.js:512 at Array.forEach (<anonymous>) at updateTags (Helmet.js:511) at commitTagChanges (Helmet.js:387) at Helmet.js:354

        import React, { useEffect } from 'react';
        import {Helmet} from "react-helmet";
        
        const Portfolio = () => {
            return(
                <>
                    <Helmet>
                        <script src="/butter.js" type="text/javascript" />
                        <script>
                            butter.init();
                          </script>
                    </Helmet>
                    <div id="butter>
                        ...
                    </div>
                </>
            );
        }

Is it at all possible that you could (if able to) create a simple guide on how to use this with React? If not no worries, but would be immensely useful

@Shrit1401
Copy link

use smooth-scrollbar.js for react

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