Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis.Learn more
Socket
Socket

bpk-component-navigation-stack

Package Overview
Dependencies
5
Maintainers
6
Versions
373
Issues
File Explorer

Advanced tools

bpk-component-navigation-stack

Backpack navigation stack component.

    3.1.13latest
    GitHub
    npm

Version published
Maintainers
6
Weekly downloads
6
decreased by-66.67%

Weekly downloads

Readme

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

Last updated on 22 Jun 2022

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
Socket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc