<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: NunoSaa</title>
    <description>The latest articles on DEV Community by NunoSaa (@nunosaa).</description>
    <link>https://dev.to/nunosaa</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1466190%2F4a4911ae-1527-41aa-aa62-fb8ab9cd9dd9.png</url>
      <title>DEV Community: NunoSaa</title>
      <link>https://dev.to/nunosaa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nunosaa"/>
    <language>en</language>
    <item>
      <title>React Native - ScrollView not work on WebBrowser (Chrome) but on IOS Simulator work well</title>
      <dc:creator>NunoSaa</dc:creator>
      <pubDate>Fri, 03 May 2024 10:32:56 +0000</pubDate>
      <link>https://dev.to/nunosaa/react-native-scrollview-not-work-on-webbrowser-chrome-but-on-ios-simulator-work-well-2012</link>
      <guid>https://dev.to/nunosaa/react-native-scrollview-not-work-on-webbrowser-chrome-but-on-ios-simulator-work-well-2012</guid>
      <description>&lt;p&gt;Im trying to develop an app using react native, but im facing some issues on web version. In this particular case is the scroll not work properly on web browser, but on iOS simulator works well.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState, useEffect } from 'react';
import { View, Text, StyleSheet, FlatList, Image } from 'react-native';
import { ListItem } from 'react-native-elements';
import axios from 'axios';

const OcorrenciasScreen = ({ navigation }) =&amp;gt; {
  const [emergencies, setEmergencies] = useState([]);

  useEffect(() =&amp;gt; {
    axios.get('http://localhost:3000/api/data')
      .then(response =&amp;gt; {
        const responseData = response.data;
        const mappedData = responseData.incident.map(item =&amp;gt; ({
          id: item.id,
          ocorrencia: item.morada, 
          description: item.desc_classificacao, 
          time: item.hora_alerta,
          data_hora_alerta: item.data_hora_alerta,
          morada: item.morada,
          localidade_morada: item.localidade_morada, 
          desc_classificacao: item.desc_classificacao
        }));
        setEmergencies(mappedData);
      })
      .catch(error =&amp;gt; {
        console.error('Error:', error);
      });
  }, []); 

  const renderItem = ({ item }) =&amp;gt; (
    &amp;lt;ListItem onPress={() =&amp;gt; navigation.navigate('OcorrenciaDetail', { emergency: item })} containerStyle={styles.item}&amp;gt;
      &amp;lt;Image source={require('./../assets/houseFireVector.png')} style={styles.image} /&amp;gt;
      &amp;lt;ListItem.Content&amp;gt;
        &amp;lt;ListItem.Title style={styles.title}&amp;gt;{item.ocorrencia}&amp;lt;/ListItem.Title&amp;gt;
        &amp;lt;ListItem.Subtitle style={styles.description}&amp;gt;{item.description}&amp;lt;/ListItem.Subtitle&amp;gt;
      &amp;lt;/ListItem.Content&amp;gt;
      &amp;lt;View style={styles.rightContainer}&amp;gt;
        &amp;lt;Text style={styles.timestamp}&amp;gt;{item.time}&amp;lt;/Text&amp;gt;
        &amp;lt;ListItem.Chevron color="" /&amp;gt;
      &amp;lt;/View&amp;gt;
    &amp;lt;/ListItem&amp;gt;
  );

  return (
    &amp;lt;View style={styles.container}&amp;gt;
      &amp;lt;FlatList
        data={emergencies}
        renderItem={renderItem}
        keyExtractor={item =&amp;gt; item.id}
      /&amp;gt;
    &amp;lt;/View&amp;gt;
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: 'white',
  },
  item: {
    backgroundColor: '#E0E0E0',
    padding: 20,
    marginVertical: 10,
    marginHorizontal: 20,
    borderColor: '#C0C0C0',
    borderWidth: 1,
    borderRadius: 5,
  },
  title: {
    fontSize: 24,
    paddingBottom: 10,
  },
  description: {
    fontSize: 18,
  },
  rightContainer: {
    flexDirection: 'row',
    alignItems: 'center',
  },
  timestamp: {
    marginRight: 10,
    color: '#888',
  },
  image: {
    width: 75,
    height: 75,
    resizeMode: 'contain',
  },
});

export default OcorrenciasScreen;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Can you help me solve this issue? How i can manage the scroll view correctly on web? I need to have the web totaly functional as the iOS version.&lt;/p&gt;

&lt;p&gt;Best regards&lt;/p&gt;

</description>
      <category>help</category>
    </item>
  </channel>
</rss>
