Closed dantman closed 8 years ago
Sorry, not related to React freezing style objects. It's probably the fact that props is not supposed to be modified and this is doing exactly that. ie: React likely freezes props
.
'use strict';
import React from 'react';
import iOSTheme from 'reapp-ui/themes/ios/theme'
import Theme from 'reapp-ui/helpers/Theme';
import View from 'reapp-ui/views/View';
import BackButton from 'reapp-ui/components/buttons/BackButton';
const ApplicationView = ({title, children}) => (
<Theme {...iOSTheme}>
<View title={[<BackButton />, title||"asdf"]}>
{children}
</View>
</Theme>
);
export default ApplicationView;
This has been fixed with: https://github.com/reapp/reapp-ui/commit/c691659f7709c5e24cf793300c96f076ece76050
I'm getting this error when trying out the back button:
Uncaught TypeError: Cannot delete property 'styles' of #<Object>
This comes from: https://github.com/reapp/reapp-ui/blob/7d9ac45c868bd14bac8aa3f949ce862f0d10577a/src/mixins/Styled.js#L37
And is likely related to the fact that React freezes objects passed to style.