reactjs - React FixedDataTable Webpack bundle - Uncaught TypeError: Cannot read property 'requestAnimationFrame' of undefined -
i've created simple component called mydatatable
, wrapper on react fixeddatatable
component , bundled webpack. file resulted bundle called my-components.js
. nothing complicated until here. can try source code see how works: https://github.com/cosminnicula/fdtwebpack
now, second step consume my-components.js
library in separate project. here https://github.com/cosminnicula/fdtwebpackclient can see how imported library , tried use <mydatatable />
component:
'use strict'; //fdtwebpackclient/src/main.jsx import react 'react'; import mydatatable './../lib/my-components.js'; react.render( <div> hello mydatatable! <mydatatable></mydatatable> </div> , document.body )
however, if try browse index.html, nasty error, don't find logical explanation for: "uncaught typeerror: cannot read property 'requestanimationframe' of undefined".
btw, wrapper component copy-pasted here http://jsbin.com/temufa/18/edit?html,js,output, should suppose work.
any idea on error?
i've identified problem , solution simple. inside fdtwebpackclient
change:
import mydatatable './../lib/my-components.js'; ... <mydatatable></mydatatable>
with:
import mycomponents './../lib/my-components.js'; ... <mycomponents.mydatatable></mycomponents.mydatatable>
Comments
Post a Comment