react-dom-box2d icon indicating copy to clipboard operation
react-dom-box2d copied to clipboard

ReferenceError: regeneratorRuntime is not defined

Open v1rtl opened this issue 6 years ago • 1 comments

When I tried the following code:

import React from 'react'
import { World, Item } from 'react-dom-box2d'
import '/styles/langs.css'

// ...
return (
        <World gravity={[0, 9.8]}>
          {codes.map((code, i) => (
            <Item restitution={0.8} key={i}>
              <figure>
                <div className="picDesc">
                  <figcaption>
                    <h3 onClick={() => open(code.html_url)}>
                      {code.fork && <span>[Fork]</span>} {code.name} ⭐ {code.stargazers_count}
                    </h3>
                    <span>
                      Language: <span className={'lang ' + code.language}>{code.language}</span>
                    </span>
                  </figcaption>
                  {code.description}
                </div>
              </figure>
            </Item>
          ))}
        </World>
       )
// ...

it threw an error that I didn't import regeneratorRuntime but it isn't listed in required packages of this component. So please add it to package.json or fix in another way because I have to install and import that dependency manually and this is not cool.

v1rtl avatar Jun 18 '19 10:06 v1rtl

Thank you for reporting it. I am going to see if there is any way to avoid re-generator at-all

nagarajanSnapwiz avatar Jun 22 '19 02:06 nagarajanSnapwiz