Closed
Description
Is this a bug report?
Yes. At the very least, if no one agrees that it "should not be frozen", then the docs need to be updated".
Have you read the Bugs section of the Contributing to React Native Guide?
Yes
Environment
react-native -v
: 0.46.3node -v
: 7.8.0npm -v
: 5.1.0yarn --version
(if you use Yarn): n/a
Then, specify:
- Target Platform: iOS
- Development Operating System: macOS 10.12.5 (16F73)
- Build tools: None. Just regular
react-native run-ios
.
Steps to Reproduce
(Write your steps here:)
const styles = StyleSheet.create({ text:{ backgroundColor:'red' } });
- Now do
const flatNew = StyleSheet.flatten(styles.text);
- Now
Object.isFrozen(flatNew)
istrue
. There is no need for this freeze. It should be mutable. If you really want it immutable, then docs need update. - http://facebook.github.io/react-native/releases/0.46/docs/stylesheet.html#flatten
Expected Behavior
There is no need for this freeze. It should be mutable. If you really want it immutable, then docs need update. - http://facebook.github.io/react-native/releases/0.46/docs/stylesheet.html#flatten
Actual Behavior
Object is frozen, it cannot be mutated.
Reproducible Demo
Link to expo reproducible: https://snack.expo.io/B1A17ZYrZ