You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have install npm install react-native-sk-countdown@lastest --save
and import by var {CountDownText} = require('react-native-sk-countdown');
but when I use follow the example behind this:
<CountDownText
style={styles.countBtn}
countType='seconds' // 计时类型:seconds / date
auto={true} // 自动开始
afterEnd={this._countingDone} // 结束回调
timeLeft={60} // 正向计时 时间起点为0秒
step={-1} // 计时步长,以秒为单位,正数则为正计时,负数为倒计时
startText='获取验证码' // 开始的文本
endText='获取验证码' // 结束的文本
intervalText={(sec) => '剩余秒数:'+sec} // 定时的文本回调
/>
but there is something wrong tips:
Seems you're trying to access 'ReactNative.createClass' from the 'react-native' package. Perhaps you meant to access 'React.createClass' from the 'react' package instead?
For example, instead of:
import React, { Component, View } from 'react-native';
You should now do:
import React, { Component } from 'react';
import { View } from 'react-native';
Check the release notes on how to upgrade your code - https://github.com/facebook/react-native/releases/tag/v0.25.1
However I have used:
var ReactNative=require('react-native');
var React=require('react');
var StyleSheet=ReactNative.StyleSheet;
var Text=ReactNative.Text;
var View=ReactNative.View;
var AlertIOS=ReactNative.AlertIOS;
var TextInput=ReactNative.TextInput;
var AsyncStorage=ReactNative.AsyncStorage;
var TouchableOpacity=ReactNative.TouchableOpacity;
var Login=React.createClass({
...})
Anyone could help with this problem?
The text was updated successfully, but these errors were encountered:
I have install npm install react-native-sk-countdown@lastest --save
and import by var {CountDownText} = require('react-native-sk-countdown');
but when I use follow the example behind this:
<CountDownText
style={styles.countBtn}
countType='seconds' // 计时类型:seconds / date
auto={true} // 自动开始
afterEnd={this._countingDone} // 结束回调
timeLeft={60} // 正向计时 时间起点为0秒
step={-1} // 计时步长,以秒为单位,正数则为正计时,负数为倒计时
startText='获取验证码' // 开始的文本
endText='获取验证码' // 结束的文本
intervalText={(sec) => '剩余秒数:'+sec} // 定时的文本回调
/>
but there is something wrong tips:
Seems you're trying to access 'ReactNative.createClass' from the 'react-native' package. Perhaps you meant to access 'React.createClass' from the 'react' package instead?
For example, instead of:
import React, { Component, View } from 'react-native';
You should now do:
import React, { Component } from 'react';
import { View } from 'react-native';
Check the release notes on how to upgrade your code - https://github.com/facebook/react-native/releases/tag/v0.25.1
However I have used:
var ReactNative=require('react-native');
var React=require('react');
var StyleSheet=ReactNative.StyleSheet;
var Text=ReactNative.Text;
var View=ReactNative.View;
var AlertIOS=ReactNative.AlertIOS;
var TextInput=ReactNative.TextInput;
var AsyncStorage=ReactNative.AsyncStorage;
var TouchableOpacity=ReactNative.TouchableOpacity;
var Login=React.createClass({
...})
Anyone could help with this problem?
The text was updated successfully, but these errors were encountered: