react-native-emoji-hook
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

alt text

Write emoji by emoji code

Demo

Installation

npm install react-native-emoji-hook

Usage

import useEmoji, { emojify } from 'react-native-emoji-hook';

// ...

const [text, setText] = useEmoji();

emojify function is not hook it is basically text to emoji text converter. you can use this for making own custom useState.

Example Code

import * as React from 'react';

import { StyleSheet, View, TextInput } from 'react-native';
import useEmoji from 'react-native-emoji-hook';

export default function App() {
  const [text, setText] = useEmoji();
  return (
    <View style={styles.container}>
      <TextInput style={styles.input} value={text} onChangeText={setText} />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
  input: {
    width: '100%',
    height: 100,
    backgroundColor: 'gray',
    fontSize: 30,
  },
});

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Package Sidebar

Install

npm i react-native-emoji-hook

Weekly Downloads

7

Version

0.2.1

License

MIT

Unpacked Size

171 kB

Total Files

18

Last publish

Collaborators

  • nomi9995