Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shimo-navigation

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shimo-navigation

石墨文档 React Native App 导航系统(based on react-navigation)

  • 0.0.45
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by233.33%
Maintainers
2
Weekly downloads
 
Created
Source

shimo-navigation

石墨文档 React Native app 导航系统


基于 react-navigation 的修改内容记录:

StackRouter:

  1. 修改了 route.key 的生成规则,由之前随机生成 uuid 改为:通过 Screen.screenKey 的静态方法生成 key ,或取 routeName 作为 key(方便 goBack 指定参数) #1
  2. 修改了调用 navigationOptions 生成函数时传入的 navigation prop 结构,同 #7
  3. 禁止了具有相同 key 的 navigate 操作 #2

StackNavigator:

  1. navigator 的 dispatch 方法里面 nav state 的设置改为同步读写 #3

Transitioner:

  1. _startTransition 在进行 reset 操作的时候禁止了不必要的动画 #4

CardStackTransitioner:

  1. _render 渲染场景的时候获取 transition blur 与 focus 的路由名,并传入 CardStack 的 transitionTargets prop 中 #5

CardStack:

  1. 只有最顶层的 navigator 才支持手势 #6
  2. 拓展了传入 screen 的 navigation prop 结构 #7
{
    ...navigation,
    position, // 转场动画的位置
    progress, // 转场动画的进度
    index, // 当前场景在navigator中的位置
    status: {
        isActive: boolean, // 是否是当前活跃的场景
        isStale: boolean, // 是否是正在退出的场景
        isResponding: boolean, // 是否处于在进行手势返回操作
        isFocusing: boolean, // 是否处于转入动画过程中
        isBlurring: boolean // 是否处于转出动画过程中
    }
}
  1. 支持在 screen navigation options 内指定当前 screen 的 mode #8
  2. 支持在 screen navigation options 内指定当前 screen 的 gesturesEnabled #9
class SomeScreen extends Component {
  static navigationOptions = {
    mode: 'card',
    gesturesEnabled: false
  };
}

ScenesReducers

  1. 修复 reset 生成的 scenes 错误 #10

Keywords

FAQs

Package last updated on 23 Jul 2019

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