2.0.0-beta • Published 4 years ago

universal-getlaunchoptionssync v2.0.0-beta

Weekly downloads
-
License
BSD-3-Clause
Repository
-
Last release
4 years ago

group: title: Application

title: getLaunchOptionsSync

getLaunchOptionsSync

npm npm

Obtains the parameters upon Mini Program startup.

Support

Install

$ npm install universal-getlaunchoptionssync --save

Usage

import { createElement, useEffect, Fragment } from 'rax';
import getLaunchOptionsSync from 'universal-getlaunchoptionssync';

function App() {
  useEffect(() => {
    const options = getLaunchOptionsSync();
    console.log(options.path);
  }, []);

  return (<>
    <View></View>
  </>)
}

It can also be imported from the big package:

import {getLaunchOptionsSync} from 'universal-api';

Return

PropertyTypeDescriptionDefault
queryObjectThe query parameter for Mini Program startup-
sceneNumberThe scene value for Mini Program startup wechat ali byte-
pathStringThe path for Mini Program startup-
referrerInfoObjectThe source information-

referrerInfo

PropertyTypeDescriptionDefault
appIdStringThe appId of the source Mini Program-
extraDataObjectThe data transfered from the source Mini Program-
2.0.0-beta

4 years ago