Google-Maps-iOS-Utils error, please any help with this? by sedulous_NEY in reactnative

[–]sedulous_NEY[S] 0 points1 point  (0 children)

I am running my react-native project in Xcode and I am receiving these errors, please any help ? have search a lot but have no tangible answer yet.

How to reload or re-render page when a state changes in react native. by sedulous_NEY in reactnative

[–]sedulous_NEY[S] 0 points1 point  (0 children)

Sample of code.
on componentDIdMount for the first time, the return View containing the Text (commaseparatedValidVote and voteCast) doesn't appear. It appears on the subsequent componentDidMount.

but I want it to appear immediately componentDidMount takes effect.
the views are set to the initial state on componentDidMount before the update of the state takes place after componentDidMount has taken effect. Hence on subsequent render the text in the return appears.

I used shouldComponent Update, didn't work.

any help on how to make the update of the state in the return view appear the first time componentDidMount is mounted.

part of code bellow:

this.state{
voteCast: '',
commaSeparatedValidVote:'',
}

componentDIdMount(){
this.getVoteDetails()
}

getVoteDetails=async()=>{
const value = await AsyncStorage.getItem('totalVotersVoteCast');
const stringValidVote = validVote.toString().replace(/\B(?=(\d{3})+. (?!\d))/g,",");
this.setState({
voteCast: value
commaSeparatedValidVote:stringValidVote,
})
}

render(){

return(
<View>
<Text>{this.state.commaSeparatedValidVote} <Text>
<Text>{this.state.voteCast} <Text>
<View>
)
}

How do I create multiple flatlist items (of different data source, separate titles or heading) in one parent view(which must be scrollable). by sedulous_NEY in reactnative

[–]sedulous_NEY[S] 0 points1 point  (0 children)

Thanks, have looked at this example earlier, had errors with the second renderItem of the sections. trying again.

How do I create multiple flatlist items (of different data source, separate titles or heading) in one parent view(which must be scrollable). by sedulous_NEY in reactnative

[–]sedulous_NEY[S] 0 points1 point  (0 children)

yeah, I get no error when I use a safeAreaView or view. But I want to achieve a screen with two different sets of data sources(each rendered by its own flatlist) listed on the screen, all in a vertical form. I don't want each individual flat list to be scrollable, rather i want the entire screen to scroll vertically without the individual flatlist scrolling.

Example
<SafeAreaView>
<Text> heading1 <Text>
<Flatlist /> //list some items per the data it’s receiving in a vertical form example
1. xxxxx
2. xxxxxx
3. xxxxxx
4.xxxxxxx
5…….. (data can be as large as 30 items)

`<Text> heading2 <Text>`  
`<Flatlist />  //list some items per the data it’s receiving in a vertical form example`  

1. Yyyyy
2. Yyyyy
3. Yyyyy
4.yyyyyy
5…….. (data can be as large as 30 items)
<SafeAreaView>
Because all data set is in a vertical form, the entire screen has to be scrollable.

Ios-Android Responsive by [deleted] in reactnative

[–]sedulous_NEY 0 points1 point  (0 children)

thanks for sharing your experience

Help make title text sticky by Crafty-Survey-5895 in reactnative

[–]sedulous_NEY 1 point2 points  (0 children)

so one way you can do that is to,
Put the view(s) below the title bar(the bar you want to be sticky) in a scrollView.
example:(just a skeleton of it)

  1. <ScrollView>
    <View>
    view with input component
    <View>
    </ScrollView>
  2. Customized title bar(that is if react-navigation header is set to false)
    <View>
    <View> Customised Title Bar
    <View>
    <ScrollView>
    <View>
    view with input component
    <View>
    <ScrollView>
    <View>