Socket
Socket
Sign inDemoInstall

@momo-kits/core

Package Overview
Dependencies
25
Maintainers
5
Versions
690
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @momo-kits/core


Version published
Weekly downloads
211
decreased by-65.75%
Maintainers
5
Created
Weekly downloads
 

Readme

Source

MoMo Navigation

Getting started

npm

$ npm install momo-component-kits

Usage

import {Navigation} from  'momo-components-kit';

Example's

Create Navigation

class MoMoMiniApp extends  React.Component {
    ....
    console.log(this.props.params.message) //Output: "Hello word"
}

export default class MoMoMiniAppNavigation extends  React.Component {
    render() {
        return (
            <Navigation
                defaultOptions: {}
                options={{tilte: "MoMo Mini App"}}
                screen={MoMoMiniApp}
                screenProps={{ message: "Hello word" }}
    	   />
	   )
    }
}

Push new screen

let { navigator } = this.props;
navigator.push({
    screen:  MoMoMiniAppDetail,
    defaultOptions: {}
    options: {title: "Detail"}
    screenProps: {message: "Hello Detail"}
});

Pop to Previous Screen

let { navigator } = this.props;
navigator.pop();

Reference

Props

screen
TypeRequiredDesciption
functionYes
screenProps
TypeRequiredDesciption
objectNo
defaultOptions
TypeRequiredDesciption
objectNo
options
TypeRequiredDesciption
objectNo
  • title: string
  • header: function
  • headerStyle: style
  • headerTitle: function
  • headerBackground: node
  • headerTitleStyle: textStyle
  • headerTintColor: color
  • headerLeft: function
  • headerLeftIcon: ImageSourcePropType
  • headerLeftStyle: style
  • headerRight: function

Methods

push(route: object)

Navigate forward to a new route.


pop()

Pop back to the previous scene.


popN(n: number)

Go back N scenes at once. When N=1, behavior matches pop().


popToTop()

Go back to the topmost item in the navigation stack.


replace(route)

Replace the route for the current scene and immediately load the view for the new route.


dismiss()

Dismiss all screens.

FAQs

Last updated on 05 Aug 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc