Loading...
Loading...
Loading...
Since BlueBase is build using React's context functionality, it is possible to access the BlueBase context (often referred to as BB
) using the same API used by any other context consumer. This is done by using the BlueBaseConsumer
component.
Use it just like any other react component.
This is the main app in the BlueBase framework. It is just a React Component, and can either be used as the top most component of your project or it can be embedded in your existing code base.
This component takes care of initialisation and renders the β©Main App Layout. If children prop is provided, then it renders the children prop instead of the Main App Layout.
Use it just like any other react component.
Sometimes, you may want to use custom context. This is especially important when some system functionality may need to be modified before the boot process.
Just create a new object of BlueBase class. And send pass it to the BlueBaseApp component as BB
prop when ready.
If children are provided to this component, then the children node is rendered instead of β©Main App Layout. The child components can use BlueBaseConsumer to access BlueBase context.
prop
type
required
default
description
BB
BlueBase
no
-
BlueBase context. If one is not provided a new object will be created.
children
number
no
-
If this prop is provided, BlueBase's own App view will not be rendered, and nodes in this prop will be rendered instead.
components
ComponentCollection
no
-
Collection of components to add in BlueBase's Component Registry.
configs
ConfigCollection
no
-
Collection of configs to add in BlueBase's Config Registry.
filters
FilterNestedCollection
no
-
Collection of Filter to add in BlueBase's Filter Registry.
plugins
PluginCollection
no
-
Collection of plugins to add in BlueBase's Plugin Registry.
themes
ThemeCollection
no
-
Collection of themes to add in BlueBase's Theme Registry.
testID
string
no
-
Used to locate this view in end-to-end tests.
BlueBase ships with 3 system level components. They play a core part in how the framework works.