New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bytedance/mona-runtime

Package Overview
Dependencies
Maintainers
5
Versions
378
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bytedance/mona-runtime

Merchant app's developing and building tools

  • 0.0.4
  • npm
  • Socket score

Version published
Weekly downloads
313
increased by42.92%
Maintainers
5
Weekly downloads
 
Created
Source

mona-runtime

mona运行时

组件

跳转组件,支持插件/应用间页面跳转

例子
import { Link } from '@bytedance/mona';

const Index = () => {
  return (
    <div>
      <Link to="/pages/home/index">navigate to home </Link>
    </div>
  )
}

export default Index;
参数说明
参数说明是否必填类型默认值
to要跳转的页面路由string-

API

navigateTo

路由跳转,跳转到新的页面

例子
import { navigateTo } from '@bytedance/mona';

navigateTo('/pages/home/index')

redirectTo

路由重定向,跳转并替换当前页面路由

例子
import { redirectTo } from '@bytedance/mona';

redirectTo('/pages/home/index')

其他

createProjectConfig

创建项目配置,mona.config.ts中使用

例子
// mona.config.ts
import { createProjectConfig } from '@bytedance/mona';
export default createProjectConfig({
  projectName: 'demo',
  input: './src/app.tsx',
  output: 'dist'
})
参数说明
参数说明是否必填类型默认值
projectName应用/插件名称string-
input入口文件路径string-
output打包后的文件目录路径string-

createAppConfig

创建应用配置,app.config.ts中使用

例子
// app.config.ts
import { createAppConfig } from '@bytedance/mona';
export default createAppConfig({
  pages: [
    'pages/Home/index',
    'pages/Info/index',
    'pages/List/index'
  ]
})
参数说明
参数说明是否必填类型默认值
pages页面路径string[]-

createPageConfig

创建页面配置,需在每个页面目录的page.config.ts中使用

例子
// page.config.ts
import { createPageConfig } from '@bytedance/mona';
export default createPageConfig({
  navigationBarTitleText: 'page title'
})
参数说明
参数说明是否必填类型默认值
navigationBarTitleText当前页面标题string-

FAQs

Package last updated on 01 Nov 2021

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