Socket
Socket
Sign inDemoInstall

bpk-component-navigation-stack

Package Overview
Dependencies
Maintainers
6
Versions
373
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bpk-component-navigation-stack

Backpack navigation stack component.


Version published
Weekly downloads
469
decreased by-38.21%
Maintainers
6
Weekly downloads
 
Created
Source

bpk-component-navigation-stack

Backpack navigation stack component.

Installation

npm install bpk-component-navigation-stack --save-dev

Usage

import React from 'react';
import BpkNavigationStack from 'bpk-component-navigation-stack';

export default () => (
  <BpkNavigationStack views={[<div />]} />
);

Props

PropertyPropTypeRequiredDefault Value
viewsarrayOf(element)true-
classNamestringfalsenull

withNavigationStackState

withNavigationStackState returns a HOC with two instance methods, pushView and popView, that can be used to push and pop views from the stack component.

import React from 'react';
import BpkNavigationStack, { withNavigationStackState } from 'bpk-component-navigation-stack';

const StatefulNavigationStack = withNavigationStackState(BpkNavigationStack);

export default () => (
  <StatefulNavigationStack initialViews={[<div />]} />
);

By default the pushView and popView callbacks are forwarded to the children, if you want to disabled this behaviour pass false as the second argument, in this case the callbacks are forwarded to the Stack component instead.

FAQs

Package last updated on 03 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc