BlueRain OS
  • Introduction
  • API
    • API Reference
  • Guides
    • Apps
      • Installation
      • Creating an App
      • Configuration
    • Components
      • Registering Components
      • Extending Components
      • Replacing Components
      • Accessing Raw Components
      • Components & HoCs
    • Filters
      • Known Filters
    • Plugins
      • Installation
      • Configuration
      • Creating a Plugin
  • Miscellaneous
    • JSON to React
  • Plugins
    • Apollo
    • Internationalization
    • Material UI
    • React Router
    • Redux
    • Redux Devtools
    • Why Did You Update
Powered by GitBook
On this page
  • Usage
  • Components
  • Filters
  • API
  • ReactRouterPluginConfigs
  • ReactRouterPlugin
  • RouterRef
  • withRouterActions
  1. Plugins

React Router

PreviousMaterial UINextRedux

Last updated 6 years ago

and .

Internally, uses for browser based apps and for react native apps. Moreover, re-exports both packages on their respective platforms.

Usage

Run the following command in the plugin directoy:

npm i --save @blueeast/bluerain-plugin-react-router

Then in your boot function, pass the plugin like this:

import BR from '@blueeast/bluerain-os';
import ReactRouterPlugin from '@blueeast/bluerain-plugin-react-router';

BR.boot({
    plugins: [ReactRouterPlugin]
})

Components

This plugin registers following components in the Component registry, so they can be reused later by other apps and plugins:

  • Link: ,

  • Route: ,

  • Switch: ,

  • Redirect: ,

Filters

None.

API

ReactRouterPluginConfigs

This is the default configuration set that is used at boot time.

Properties

ReactRouterPlugin

Extends Plugin

React Router (v4) plugin to add routing capabilities to BlueRain Apps.

Properties

RouterRef

This plugin saves router object in the BlueRain context. This can be accessed in the following way:

const router = ctx.refs.router;

Properties

withRouterActions

withRouterActions higher order component that passes router action functions inside router prop. The functions include: push, replace, go, goBack, goForward

Parameters

  • Component Component

androidBackButton [default: true] Listen for Android Back button on React Native.

deepLinking [default: false] Enable deep linking on react native.

pluginName "ReactRouterPlugin"

slug "router"

history React Router's history object

React Router V4
Redux integration
react-router-dom
react-router-native
Web
Native
Web
Native
Web
Native
Web
Native
boolean
Details
boolean
Details
string
string
object