How to use @tarojs/taro-rn - 10 common examples

To help you get started, we’ve selected a few @tarojs/taro-rn examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BinZhiZhu / Taro-v2ex-weapp / rn_temp / components / latest-data-default-list / index.js View on Github external
}).then(result => {
        Taro.hideLoading();
        if (result.status === 'error') {
          showToast(result.message);
        }
        console.log('获取最新节点', result);
        this.props.dispatch({
          type: LATEST_TOPIC_LIST,
          data: result.data
        });
      }).catch(error => {
        showToast(error.message);
github BinZhiZhu / Taro-v2ex-weapp / rn_temp / components / latest-data-list / index.js View on Github external
}).then(result => {
        Taro.hideLoading();
        if (result.status === 'error') {
          showToast(result.message);
        }
        console.log('获取最热节点', result);
        this.props.dispatch({
          type: HOT_TOPIC_DATA,
          data: result.data
        });
      }).catch(error => {
        showToast(error.message);
github BinZhiZhu / Taro-v2ex-weapp / rn_temp / components / latest-data-default-list / index.js View on Github external
}).then(result => {
        Taro.hideLoading();
        if (result.status === 'error') {
          showToast(result.message);
        }
        console.log('获取最新节点', result);
        this.props.dispatch({
          type: LATEST_TOPIC_LIST,
          data: result.data
        });
      }).catch(error => {
        showToast(error.message);
github BinZhiZhu / Taro-v2ex-weapp / rn_temp / components / latest-data-list / index.js View on Github external
import React from 'react';
import { hideLoading, navigateTo, showToast } from "@tarojs/taro-rn";
import { AtAvatar, AtTag } from "taro-ui";
import { ScrollView, Text, View } from "@tarojs/components-rn";
import isEmpty from "lodash/isEmpty";
import { connect } from "@tarojs/taro-redux-rn";
import indexStyleSheet from "./index_styles";
import formatAvatar from "../../utils/formatAvatarUrl";
import getDiffTimeStamp from "../../utils/diffTimeStamp";
import showLoading from "../../utils/showLoading";
import callAPI from "../../utils/callAPI";
import api from "../../utils/api";
import { HOT_TOPIC_DATA } from "../../constants";

var _styleSheet = indexStyleSheet;
let LatestDataList = (_dec = connect(state => state), _dec(_class = class LatestDataList extends Taro.Component {
  constructor(...args) {
    var _temp;

    return _temp = super(...args), this.getList = () => {
      switch ("rn") {
        case 'h5':
          this.props.dispatch({
            type: HOT_TOPIC_DATA,
            data: null
          });
          hideLoading();
          break;
        case 'weapp':
          this.getLatestTopic();
          break;
      }
github BinZhiZhu / Taro-v2ex-weapp / rn_temp / components / latest-data-default-list / index.js View on Github external
import { hideLoading, navigateTo, showToast } from "@tarojs/taro-rn";
import { AtAvatar, AtIcon, AtTag } from "taro-ui";
import { ScrollView, Text, View } from "@tarojs/components-rn";

import { connect } from "@tarojs/taro-redux-rn";
import indexStyleSheet from "./index_styles";
import formatAvatar from "../../utils/formatAvatarUrl";
import getDiffTimeStamp from "../../utils/diffTimeStamp";
import showLoading from "../../utils/showLoading";

import callAPI from "../../utils/callAPI";
import api from "../../utils/api";
import { LATEST_TOPIC_LIST } from "../../constants";

var _styleSheet = indexStyleSheet;
let LatestDataDefaultList = (_dec = connect(state => state), _dec(_class = class LatestDataDefaultList extends Taro.Component {
  constructor(...args) {
    var _temp;

    return _temp = super(...args), this.getList = () => {
      switch ("rn") {
        case 'h5':
          this.props.dispatch({
            type: LATEST_TOPIC_LIST,
            data: null
          });
          hideLoading();
          break;
        case 'weapp':
          this.getLatestTopic();
          break;
      }
github BinZhiZhu / Taro-v2ex-weapp / rn_temp / components / latest-data-list / index.js View on Github external
}).catch(error => {
        showToast(error.message);
      });
    }, this.goDetail = topic_id => {
github BinZhiZhu / Taro-v2ex-weapp / rn_temp / pages / detail / index.js View on Github external
}).then(result => {
        Taro.hideLoading();
        if (result.status === 'error') {
          showToast(result.message);
        }
        console.log('获取帖子详情', result);
        this.props.dispatch({
          type: TOPIC_DETAIL_DATA,
          data: result.data
        });
      }).catch(error => {
        showToast(error.message);
github BinZhiZhu / Taro-v2ex-weapp / rn_temp / pages / hot / index.js View on Github external
var _class, _temp;

import Taro from '@tarojs/taro-rn';
import React from 'react';

import { View } from "@tarojs/components-rn";
import LatestDataList from "../../components/latest-data-list/index";

let Index = (_temp = _class = class Index extends Taro.Component {

  render() {
    return ;
  }
}, _class.config = {
  navigationBarTitleText: '最热'
}, _temp);


export default Index;
github BinZhiZhu / Taro-v2ex-weapp / rn_temp / pages / index / index.js View on Github external
var _class, _temp;

import Taro from '@tarojs/taro-rn';
import React from 'react';

import { View } from "@tarojs/components-rn";
import LatestDataDefaultList from "../../components/latest-data-default-list/index";

let Index = (_temp = _class = class Index extends Taro.Component {

  render() {
    return ;
github BinZhiZhu / Taro-v2ex-weapp / rn_temp / pages / detail / index.js View on Github external
import { AtAvatar, AtTag } from "taro-ui";
import isEmpty from "lodash/isEmpty";
import { TaroRichText } from 'taro_rich_text';
import { RichText, Text, View } from "@tarojs/components-rn";
import { connect } from "@tarojs/taro-redux-rn";
import showLoading from "../../utils/showLoading";
import showAlert from "../../utils/showAlert";
import callAPI from "../../utils/callAPI";
import api from "../../utils/api";
import { TOPIC_DETAIL_DATA, TOPIC_REPLIES_DATA } from "../../constants";
import formatAvatar from "../../utils/formatAvatarUrl";
import getDiffTimeStamp from "../../utils/diffTimeStamp";
import indexStyleSheet from "./index_styles";

var _styleSheet = indexStyleSheet;
let Index = (_dec = connect(state => state), _dec(_class = class Index extends Taro.Component {
  constructor(...args) {
    var _temp;

    return _temp = super(...args), this.state = {
      topic_id: 0
    }, this.clearData = () => {
      this.props.dispatch({
        type: TOPIC_REPLIES_DATA,
        data: null
      });
      this.props.dispatch({
        type: TOPIC_DETAIL_DATA,
        data: null
      });
    }, this.getList = () => {
      switch ("rn") {

@tarojs/taro-rn

Taro RN framework

MIT
Latest version published 28 days ago

Package Health Score

84 / 100
Full package analysis