Open kayali1411 opened 5 years ago
I installed ic-snacks on Gatsby project, I wrapped layout component with StyleRoot but after running the project I got the following error
ic-snacks
layout
StyleRoot
TypeError: Cannot read property 'render' of undefined isStateless node_modules/ic-snacks/dist/esm/styles/themer/withTheme.js:11 8 | import { cleanConfig, themePropTypes } from './utils'; 9 | 10 | var isStateless = function isStateless(component) { > 11 | return !component.prototype.render; 12 | };
the issue could be fixed if I removed .prototype and called component.render but I am sure I should not modify node_mdoules files directly.
.prototype
component.render
node_mdoules
Will be fixed shortly, thanks!
I installed
ic-snacks
on Gatsby project, I wrappedlayout
component withStyleRoot
but after running the project I got the following errorthe issue could be fixed if I removed
.prototype
and calledcomponent.render
but I am sure I should not modifynode_mdoules
files directly.