Error while using FlatUIImplementationProvider.
See original GitHub issueProblem
When FlatUIImplementationProvider is enabled as a default UIImplementationProvider usage of Svg
component leads to crash on Android platform:
Red screen dissolves only when I delete usage of component with Svg
with Path
instance inside from screen layout. Rendering only <Svg />
without children seems OK.
Some extra data:
Versions:
react: 16.0.0-alpha.12
react-native: 0.46.1
react-native-svg: 5.3.0
Component example
/**
* @providesModule CheckIcon
*/
import React, {PureComponent} from 'react';
import {Svg, Path} from 'react-native-svg';
export default class CheckIcon extends PureComponent {
static defaultProps = {
color: "#ffffff",
thickness: 2,
};
render() {
return (
<Svg
style={this.props.style}
width={this.props.width}
height={this.props.height}
viewBox="0 1 45 33">
<Path
stroke={this.props.color}
strokeWidth={this.props.thickness}
strokeLinecap="round"
fill="none"
d="M3 19.3995271L14.775 30.475 42.25 3" />
</Svg>
);
}
}
Usage example
import React, {Component} from 'react'
import {View} from 'react-native';
import CheckIcon from 'CheckIcon';
class Screen extends Component {
render () {
return (
<View style={[styles.summary, {this.props.height}]}>
<View style={[styles.body, {this.props.width}]}>
<View style={[styles.status, {left: this.props.width / 2 - STATUS_ICON_SIZE / 2}]}>
<CheckIcon width={24} height={18} thickness={6} />
</View>
</View>
</View>
);
}
}
const STATUS_ICON_SIZE = 50;
const styles = StyleSheet.create({
summary: {
flex: 1,
flexDirection: 'column',
justifyContent: 'space-between',
alignItems: 'center',
backgroundColor: '#515fa7',
},
body: {
position: 'relative',
},
status: {
position: 'absolute',
top: -60,
backgroundColor: '#00b670',
height: STATUS_ICON_SIZE,
width: STATUS_ICON_SIZE,
borderRadius: STATUS_ICON_SIZE / 2,
justifyContent: 'center',
alignItems: 'center',
},
});
Possibly the problem related to https://github.com/facebook/react-native/issues/12770 issue, but I’m not sure about that
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
The mode of flatui was not work FlatUIImplementationProvider
I was setup UIImplementationProvider in ReactNativeHost, and do the fresco initialization as well.but when start the application it would ...
Read more >Error While Bulk Uploading The Values In The Value Set ...
Created a context specific DFF on the value set and uploaded the values through flat file but when the values are imported using...
Read more >com.facebook.react.uimanager.IllegalViewOperationException
I had a style with a string value ("20pt") when it should have been an integer, styling a Text field. Somehow this makes...
Read more >Error Message BMXAA6138E Importing Flat Files Using ... - IBM
Here is a checklist that you to follow to solve the error message "BMXAA6138E = File cannot be imported. Enterprise Service's object structure...
Read more >likecoin: 0.27.2 (!11460) · Merge requests - GitLab
The app complies with the inclusion criteria. ... Builds with fdroid build ... Error! Fastlane was not found in your repo!
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hm, some progress?
Is this still an issue with the latest version? This seems to work fine: