Components

BlogSingleScreen

<BlogSingleScreen />

Constructor

# <BlogSingleScreen />

You can use this component to display your Blog single screen in your custom screen.

Properties:
Name Type Attributes Description
blogId Number <optional>

The id of the blog to display

searchTerm String <optional>

If the blog is not yet available in the app state, the component will attempt to a list of blogs. You can use this field to search for the specific blog you want to load instead of loading a list of blogs.

LoadingComponent ReactComponent <optional>

Use this to display your own loading component while the screen is loading

Example

Use BlogSingleScreen in custom navigation route "book"

//In custom_code/components/MyCustomScreen.js

import React from 'react';
import { View, Text } from 'react-native';
import BlogScreen from "@src/containers/Custom/BlogSingleScreen";

const MyCustomScreen = (props) => {

   if (! props.isFocused)
       return null;

   return (
       <View style={{ flex: 1 }}>

           <View style={{ marginTop: 50, alignSelf: "center" }}>
               <Text>
                   My App Title
               </Text>

           </View>

           <View style={{ flex: 1, marginBottom: 80 }}>
               <BlogScreen blogId={68} searchTerm="Youtube" />
           </View>
       </View>
   )

}


export default MyCustomScreen;

//In custom_code/index.js...

...

import MyCustomScreen from "./components/MyCustomScreen";

export const applyCustomCode = externalCodeSetup => {

 externalCodeSetup.navigationApi.addNavigationRoute(
   "book",
   "BookScreen",
   MyCustomScreen,
   "All"
 );
 externalCodeSetup.navigationApi.addNavigationRoute(
   "book",
   "BookScreen",
   MyCustomScreen,
   "Main"
 );
}