render: function() {
const props = {...this.props} || {};
props.style = props.style || {};
if (!props.style.position) {
props.style.position = 'absolute';
}
// default panos to being a render group
if (!props.style.renderGroup) {
props.style.renderGroup = true;
}
It just assumes props.style is an object and doesn't try to resolve from a stylesheet id.
I guess all these components should be modified to know how to deal with stylesheet id-s. Or alternatively, to use StyleSheet internally to mix styles, instead of mutating user-supplied values.
Description
Some internal ReactVR components like Pano and CylindricalLayer crash if given a stylesheet instead of a literal object with styles.
Expected behavior
Stylesheets should work :)
Actual behavior
Produces an error like this:
Reproduction
Solution
I presume the problem is code like this:
It just assumes
props.style
is an object and doesn't try to resolve from a stylesheet id.I guess all these components should be modified to know how to deal with stylesheet id-s. Or alternatively, to use StyleSheet internally to mix styles, instead of mutating user-supplied values.
Additional Information
react-vr@1.4.0
react-vr-web@1.4.0