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

@dol-design/rn

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dol-design/rn

  • 0.1.1
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

Dolphin React Native Components

Dolphin提供了兼容了三端的可配置组件库

RN Usage

import { Button } from '@dol-design/rn';

Web Usage

我们在web上使用了 react-native-web 这个库,所以需要做下一些额外的配置

alias: {
      'react-native$': 'react-native-web',
      '@storybook/react-native': '@storybook/react',
      'react-native-svg': 'react-native-svg-web',
      'react-native-linear-gradient': 'react-native-web-linear-gradient'
    },

Develop

yarn

Web 开发

yarn storybook-web

模拟器开发

cd ios
pod install
yarn ios
yarn storybook

注意事项

  • ios 启动需要 cd ios/ 下进行pod install之后才能启动 ios模拟器
  • 推荐使用react-native-debugger调试。由于我们使用的是0.60版本所以rnd的版本需要使用0.10的本否则很多功能会没有
  • yarn ios 启动模拟器后可以在模拟器里面直接查看storybook接口,或者通过在web上查看。但是RN组件会在模拟器或者真机上看。真机调试可以去RN官网查看具体用法。
  • storybook写法需要用老的的写法,具体可以查看文档。或者按照现有组件来。点这里
  • 碰见问题,最好看具体错误。修改后需要reload一下。
  • 支持react-native-web
  • 安装完包之后 启动直接 yarn storybook-web即可

问题记录

目前排查是由于 plugins: ['@babel/plugin-proposal-class-properties'] 导致的错误。并且remove 包后需要清楚cache才能运行。

FAQs

Package last updated on 08 Apr 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