npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

meiyou-rn-framework

v0.1.4

Published

React Native Framework -- RN 开发框架 ==========

Downloads

4

Readme

React Native Framework -- RN 开发框架

URL

Intro

目录结构

.
├── andriod/                 # 安卓相关文件目录
├── bin/                     # 项目自动化配置文件
├── build/                   # 编译打包地址目录
├── doc/                     # 工程相关文档目录
├── ios/                     # ios相关文件目录
├── app                      # 源码目录
│   ├── images/              # 图片目录
│   ├── screens/             # 每个页面代码存放目录
│   ├── components/          # 组件目录
│   ├── containers/          # 容器组件目录
│   ├── styles/              # 样式对象文件目录
│   └── config.js            # 全局配置文件
├── .babelrc                 # babel 文件
├── index.android.js         # 安卓端入口文件
├── index.ios.js             # ios端入口文件
├── .editorconfig            # 配置编辑器
├── .gitignore               # 配置忽略文件
├── .watchmanconfig          # 配置忽略文件
├── gulpfile.js              # gulp任务配置
├── package.json             # 项目配置,依赖第三方模块,依赖的库
└── README.md                # 项目说明

组件列表

  • MImage 图片优化组件 /component/image/
  • 下拉刷新组件(美柚两点旋转下拉刷新组件) /component/native/refreshControl.js
  • 下拉刷新组件(美柚小柚子旋转下拉刷新组件) /component/native/refreshControl1.js
  • 搜索框

0.48版本升级

purecomponent

React.createClass

var createReactClass = require('create-react-class');

var Component = createReactClass({
  mixins: [MixinA],
  render() {
    return <Child />;
  }
});

React.PropTypes

// After (15.5)
import React from 'react';
import PropTypes from 'prop-types';

class Component extends React.Component {
  render() {
    return <div>{this.props.text}</div>;
  }
}

Component.propTypes = {
  text: PropTypes.string.isRequired,
};

分层架构

  • src/common/ 存放底层方法的封装,网络请求、协议跳转、事件监听等和Native 进行的交互的方法。

样式

config.toPx(num): 绝对像素;比如 borderwidth 为1px;

趟过的坑

  1. 页面有两个地方需要手动配置app文件
  • 为支持gif图片,打开android/app/build.gradle加入下面代码
  dependencies: { 
    ...
       // For animated GIF support
      compile 'com.facebook.fresco:animated-base-support:0.11.0'  
      // For WebP support, including animated WebP
      compile 'com.facebook.fresco:animated-gif:0.11.0'  
      compile 'com.facebook.fresco:animated-webp:0.11.0' 
      compile  'com.facebook.fresco:webpsupport:0.11.0'  
  • 为支持iconfont,需安装react-native-vector-icons 配置方法见https://github.com/oblador/react-native-vector-icons , 目前代码里安卓已经配置好,ttf文件已经拷贝到.\android\app\src\main\assets\fonts ,ios还未配置,需自行配置
  1. debugger页面跳转报错

running is not ready for debugging

解决办法:localhost 改为你本机的地址 

使用的第三方组件

动画组件 react-native-animatable

相关资料