You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to be able to use this library to reuse the code between mobile devices, tablets and web browser. I try to put a style attribute on the view tag of my component, but the error persist. Is there any way to fix the error?
Thanks!
The text was updated successfully, but these errors were encountered:
I found the same issue in a different repo and they solved it replacing:
ViewPropTypes.style
with:
PropTypes.any
I tested this change locally and it seems to work with this repo too.
I had to do this change in grid/index.js, and section/index.js.
Those files are already importing PropTypes and using it, so looks like a suitable solution.
mohghaderi
added a commit
to mohghaderi/react-native-responsive-layout
that referenced
this issue
Feb 24, 2021
When I try to use the library in a web browser it gives me the following error:
TypeError: Cannot read property 'style' of undefined
Module .../node_modules/react-native-responsive-layout/src/components/grid/index.js
C:/.../node_modules/react-native-responsive-layout/src/components/grid/index.js:216
213 | horizontal: PropTypes.bool,
214 | scrollable: PropTypes.bool,
215 | relativeTo: PropTypes.oneOf(['parent', 'self', 'window']),
216 | style: ViewPropTypes.style,
217 | stretchable: PropTypes.bool,
218 |
219 | children: PropTypes.oneOfType([
It would be great to be able to use this library to reuse the code between mobile devices, tablets and web browser. I try to put a style attribute on the view tag of my component, but the error persist. Is there any way to fix the error?
Thanks!
The text was updated successfully, but these errors were encountered: