React native UI example/template. Blog posts list

React Native example/template, Blog posts list! . Take a look at this UI example and see how it can enhance your project. You can copy or download the code and use it in your project. Don't forget to browse our library of other free React Native templates for even more design and functionality inspiration. Happy coding!

import React from 'react';
import { View, Text, Image, StyleSheet, ScrollView, TouchableOpacity } from 'react-native';

const posts = [
  {
    id: 1,
    title: 'Post 1',
    image: 'https://www.bootdey.com/image/280x280/7B68EE/000000',
    author: 'Jane Doe',
    date: 'January 1, 2020',
    excerpt: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin ornare magna eros, eu pellentesque tortor vestibulum ut. Maecenas non massa sem. Etiam finibus odio quis feugiat facilisis.',
  },
  {
    id: 2,
    title: 'Post 2',
    image: 'https://www.bootdey.com/image/280x280/7B68EE/000000',
    author: 'John Doe',
    date: 'January 2, 2020',
    excerpt: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin ornare magna eros, eu pellentesque tortor vestibulum ut. Maecenas non massa sem. Etiam finibus odio quis feugiat facilisis.',
  },
];

const BlogScreen = () => {
  return (
    <ScrollView>
      {posts.map(post => (
        <TouchableOpacity key={post.id} style={styles.post}>
          <Image source={{ uri: post.image }} style={styles.postImage} />
          <View style={styles.postContent}>
            <Text style={styles.postTitle}>{post.title}</Text>
            <Text style={styles.postMeta}>
              by {post.author} | {post.date}
            </Text>
            <Text style={styles.postExcerpt}>{post.excerpt}</Text>
          </View>
        </TouchableOpacity>
      ))}
    </ScrollView>
  );
};

const styles = StyleSheet.create({
  post: {
    marginBottom: 20,
  },
  postImage: {
    width: '100%',
    height: 200,
  },
  postContent: {
    padding: 20,
  },
  postTitle: {
    fontSize: 20,
    fontWeight: 'bold',
    marginBottom: 10,
  },
  postMeta: {
    fontSize: 14,
    color: '#999',
    marginBottom: 10,
  },
  postExcerpt: {
    fontSize: 14,
  },
});

export default BlogScreen;

                                            

Similar snippets

React native template. simple task list view with add and remove buttons

simple task list view with add and remove buttons

React native template. Social network home posts list

Social network home posts list

About this react-native template

This react-native template, Blog posts list, was published on Dec 31st 2022, 10:43 by Bootdey Admin and it is free.

We hope you will enjoy this awesome react-native template and stay tuned for the latest updates, we believe it will save your precious time and gives trendy look to your next application.

This template currectly have 3.2K views, Using this react-native template you have the following benefits:

Example Screens

You can jump start your development with our pre-built example, all you need to do is copy the code and execute it, You can also show it to your customers so that they have an idea of the final result.

Cross-platform for mobile development

This template was developed for Android and iOS.

Simple Integration

This template can be simply integrated on existing projects and new ones too, all you need to do is copy the code and start working.

Fully coded view

this is a functional example, You will save a lot of time going from prototyping to full-functional code.