xiewang / react-native-emoticons Goto Github PK
View Code? Open in Web Editor NEWreact native emoticons(表情), including emoji😁
License: MIT License
react native emoticons(表情), including emoji😁
License: MIT License
{
"name": "test",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"eslint": "^4.19.1",
"native-echarts": "^0.4.0",
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-emoticons": "^1.0.10",
"react-native-root-toast": "^3.0.1",
"react-native-sound": "^0.10.9",
"react-native-storage": "^0.2.2",
"react-native-svg": "^6.3.1",
"react-navigation": "^2.0.1",
"redux": "^4.0.0",
"teaset": "^0.5.6",
"victory-native": "^0.17.4"
},
"devDependencies": {
"babel-jest": "22.4.3",
"babel-preset-react-native": "4.0.0",
"jest": "22.4.3",
"react-test-renderer": "16.3.1"
},
"jest": {
"preset": "react-native"
}
}
import React, {Component} from 'react';
import {
StyleSheet,
Text,
TouchableOpacity,
View,
Platform,
ScrollView
} from 'react-native';
import {Button, NavigationPage, ListRow, Input} from "teaset";
import toAst from 'react-native-root-toast';
import Emoticons from 'react-native-emoticons';
export default class Emot1Scene extends NavigationPage {
static defaultProps = {
...NavigationPage.defaultProps,
title: '表情测试',
showBackButton: true,
};
constructor(props) {
super(props);
this.state = {
showEmoticons: false,
};
}
componentDidMount(){
}
_onEmoticonPress = () => {
}
_onBackspacePress = () => {
}
renderPage(){
return (
<View>
<Emoticons
onEmoticonPress={this._onEmoticonPress}
onBackspacePress={this._onBackspacePress}
show={this.state.showEmoticons}
concise={true}
showHistoryBar={true}
showPlusBar={true}
/>
</View>
);
}
}
我发现我这边android下,表情全成黑白的了,iphone正常。
昨天更新了次所有包括rn版本,貌似你这个也升级了(手机忘带,明天确认下手机上的旧版本app是否也是黑白)。
你看下你那边是否是黑白色。(今晚貌似rn升级到0.45了又,新建项目都运行不起来)
When I import the module appers this error:
/app/node_modules/react-native-scrollable-tab-view/SceneComponent.js: A trailing comma is not permitted after the rest element (9:32)
7 |
8 | const SceneComponent = (Props) => {
> 9 | const {shouldUpdated, ...props, } = Props;
| ^
10 | return <View {...props}>
11 | <StaticContainer shouldUpdate={shouldUpdated}>
12 | {props.children}
i am use this const string = emoticons.stringify('This is source emoji 😁'); when first installation its normal, but after i reloading, this error always showing
按步骤引入 会红屏报错 react-native-scrollable-tab-view/Scen3eComponent 报语法错误
Can I using the png in emoji-datasource for those emoji?
The emoji are not consistent with iOS and Android
This is a great component, but on an iPhone 7, rendering this with concise={false}
takes 5+ seconds. On most Android devices it's even longer (10 seconds). I assume this is because there is a bunch of processing going on with 1100+ emojis, but this lag basically makes this unusable for me.
//Most database can't restore the emoji string😤,so we map
//them to common string.
const string = emoticons.stringify('This is source emoji 😁');
console.log(string);
//output
'This is source emoji [GRIMACING FACE]'
我这测试是转成了This is source emoji [1F601]
I'm using RN 0.49 and emoticons 1.0.7
_onEmoticonPress and _onBackspacePress are implemented
and showEmoticons has been defined in constructor
<Emoticons
onEmoticonPress={this._onEmoticonPress.bind(this)}
onBackspacePress={this._onBackspacePress.bind(this)}
show={this.state.showEmoticons}
concise={true}
showHistoryBar={true}
showPlusBar={true}
/>
use stringify and parse
1 trans to 1️⃣
I can not seem to find this package for the web. I specifically need this functionality bellow:
const emoji = emoticons.parse('This is source emoji [GRIMACING FACE]');
console.log(emoji);
Hi,
Can you give us an example of how to get the emoticon as a text after we selected it ?
Tip: The attribute onEmoticonPress can get the emoticons results like {code:'😁', name: 'GRIMACING FACE'}.
Thank you for your time
debug下测试的巨卡,release下还没测。
When i import the Emoticons module, i get this error Undefined is not an object ( ViewPropTypes.styles ) in DefaultTabBar.js
I'm having the same problem:
I do not feel like changing the version of react native. There is another solution?
my version:
"react-native": "0.52.0"
You can pull or fork with link on my Github
https://github.com/huuluan97/react-native-emoticons
System:
OS: macOS 11.1
CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
Memory: 364.23 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.18.3 - /usr/local/bin/node
Yarn: 1.22.5 - /usr/local/bin/yarn
npm: 6.14.6 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 23, 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 30.0.1, 30.0.2
System Images: android-29 | Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.0 AI-193.6911.18.40.6626763
Xcode: 12.3/12C33 - /usr/bin/xcodebuild
Languages:
Java: 11.0.9.1 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.4 => 0.63.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Issue is arising in after upgrading from react-native 0.59 to 0.63.4
Entire tab content is hidden after a few seconds of the tab button is pressed. That behaviour seems to occurs after some show/hide/show of the component
查阅了官方源码,ViewPropTypes 这个东西是在 0.44 版本中添加的
兼容方案
import { View, ViewPropTypes as RNViewPropTypes } from 'react-native';
const ViewPropTypes = RNViewPropTypes || View.propTypes;
export default ViewPropTypes;
Android支持和IOS显示的效果吗?
有演示使用的demo程序吗?就象你贴出来的gif图片的效果。
谢谢。
getting this error when importing Emoticons as described in readme file,
react native 0.42
screenshot :
partial stack trace :
2017-06-08 14:17:01.743 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Exception '-[NSNull integerValue]: unrecognized selector sent to instance 0x1034d0180' was thrown while invoking updateExceptionMessage on target ExceptionsManager with params (
"undefined is not an object (evaluating 'ViewPropTypes.style')",
(
{
column = 28;
file = "node_modules/react-native-emoticons/node_modules/react-native-scrollable-tab-view/DefaultTabBar.js";
lineNumber = 20;
methodName = "";
},
{
column = 12;
file = "node_modules/react-native/packager/src/Resolver/polyfills/require.js";
lineNumber = 171;
methodName = loadModuleImplementation;
},
{
column = 30;
file = "node_modules/react-native-emoticons/node_modules/react-native-scrollable-tab-view/index.js";
lineNumber = 20;
methodName = "";
},
{
column = 12;
file = "node_modules/react-native/packager/src/Resolver/polyfills/require.js";
lineNumber = 171;
methodName = loadModuleImplementation;
},
{
column = 0;
file = "node_modules/react-native-emoticons/index.js";
lineNumber = 18;
methodName = "";
},
{
column = 12;
file = "node_modules/react-native/packager/src/Resolver/polyfills/require.js";
lineNumber = 171;
methodName = loadModuleImplementation;
},
_onBackspacePress这个函数怎么写的,百度谷歌了半天没有找到删除textInput内容的解决方案
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.