@splunk/react-page v2.1.1
@splunk/react-page
Loads a React component into the latest layout from the Splunk Enterprise server, including the Splunk bar, app bar, and a footer around your page content.
This package dynamically loads the Layout API from the correct location.
Using this package requires splunkd
partials to be loaded on the page.
Install
Install the package and its dependencies.
- Install the peer dependencies:
npm install react@^16 react-dom@^16 styled-components@^5
- Install the package:
npm install @splunk/react-page
Usage
In a basic scenario, the layout takes a React element and an optional options object.
import layout from '@splunk/react-page';
import MyPage from 'pages/MyPage';
layout(<MyPage />, { pageTitle: 'A React Page', hideFooter: true, layout: 'fixed' });
React 18
To use the new createRoot functionality introducted in React 18, use the '@splunk/react-page/18'
import instead of @splunk/react-page
.
import layout from '@splunk/react-page/18';
import MyPage from 'pages/MyPage';
layout(<MyPage />, { pageTitle: 'A React Page', hideFooter: true, layout: 'fixed' });
1 month ago
29 days ago
3 months ago
23 days ago
4 months ago
2 months ago
3 months ago
12 months ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
5 years ago
5 years ago
6 years ago
7 years ago