Publicidad
Publicidad

Más contenido relacionado

Publicidad

El bueno, el feo y el malo

  1. Barcelona
  2. Tecnología Ide Entorno visual Integración de API ¿Quien está detrás? ¿Que hay por dentro? Hot reload Datos Arquitectura Plataformas Ejemplos de código
  3. Tecnologia IDE Quien está detrás
  4. Integración API
  5. Hot Reload
  6. Datos
  7. ¿Qué hay por dentro?
  8. Arquitectura
  9. Plataformas
  10. Cargar HTTP
  11. public async Task<List<TodoItem>> RefreshDataAsync () { ... var uri = new Uri (string.Format (Constants.TodoItemsUrl, string.Empty)); ... var response = await _client.GetAsync (uri); if (response.IsSuccessStatusCode) { var content = await response.Content.ReadAsStringAsync (); Items = JsonConvert.DeserializeObject <List<TodoItem>> (content); } ... }
  12. Future<http.Response> fetchPost() { return http.get('https://jsonplaceholder.typicode.com/posts/1'); }
  13. async componentDidMount() { //Have a try and catch block for catching errors. try { //Assign the promise unresolved first then get the data using the json method. const pokemonApiCall = await fetch('https://pokeapi.co/api/v2/pokemon/'); const pokemon = await pokemonApiCall.json(); this.setState({pokeList: pokemon.results, loading: false}); } catch(err) { console.log("Error fetching data-----------", err);
  14. Crear un listado
  15. <ListView x:Name="listView" ItemTapped="OnItemTapped" ItemsSource="{Binding .}" />
  16. ListTile( leading: GestureDetector( behavior: HitTestBehavior.translucent, onTap: () {}, child: Container( width: 48, height: 48, padding: EdgeInsets.symmetric(vertical: 4.0), alignment: Alignment.center, child: CircleAvatar(), ), ), title: Text('title'), dense: false, ),
  17. render() { return ( <View style={styles.container}> <FlatList data={[ {key: 'Devin'}, {key: 'Dan'}, {key: 'Dominic'}, {key: 'Jackson'}, {key: 'James'}, ]} renderItem={({item}) => <Text style={styles.item}>{item.key}</Text>} /> </View> );
  18. Referencias
  19. https://towardsdatascience.com/flutter-vs-react-native-vs- xamarin-which-is-the-best-choice-for-2019-2bc30fc76442 https://docs.microsoft.com/en-us/xamarin/ https://flutter.dev/docs/get-started/install https://facebook.github.io/react-native/docs/getting-started
  20. Conclusiones
  21. ¿Preguntas?
  22. Redención…
  23. Gracias

Notas del editor

  1. https://www.slideshare.net/JosManuelMonteroOrte/cocina-conxamarin
  2. https://towardsdatascience.com/flutter-vs-react-native-vs-xamarin-which-is-the-best-choice-for-2019-2bc30fc76442 https://docs.microsoft.com/en-us/xamarin/ https://flutter.dev/docs/get-started/install https://facebook.github.io/react-native/docs/getting-started
Publicidad