Components

ForumsSingleScreen

<ForumsSingleScreen />

Constructor

# <ForumsSingleScreen />

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

Properties:
Name Type Attributes Description
forumId Number <optional>

The id of the forum to display

searchTerm String <optional>

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

LoadingComponent ReactComponent <optional>

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

Example

Use ForumsSingleScreen in custom navigation route "book"

//In custom_code/components/MyCustomScreen.js
import React from 'react';
import { View, Text } from 'react-native';
import ForumsSingleScreen from "@src/containers/Custom/ForumsSingleScreen";

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 }}>
               <ForumsSingleScreen forumId={198} />
           </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"
 );
}