How to render emojis with JavaScript
Emmanuel Gautier / February 28, 2021
1 min read
For the content of your posts, emojis add some fun to your pages. This short post explains how to make that possible in JavaScript.
The most conveniant is to use directly the right emoji Unicode. Here a JSX example :
<span>{'\u{1F680}'}</span>
You can also use the node-emoji package to help you manipulate them.
If you want to know what unicode emoji to add, you can find this page useful : Full Emoji List
Comments
Related Posts
Solve React error "Property autocomplete does not exist on type"
Sometimes, it happens that an easy-to-solve issue takes you more time than it should. The Typescript React error "Property autocomplete does not exist on type" is maybe one of them.
How to use Chakra UI Button and Link components with NextJS Link
There is some glue to add to make Chakra UI and NextJS work together. The Chakra UI components do not generate the "a" tag by default for a link. Let's see how to use the Chakra button to generate links between pages.
How to use Chakra UI Button and Link components with NextJS Link
There is some glue to add to make Chakra UI and NextJS work together. The Chakra UI components do not generate the "a" tag by default for a link. Let's see how to use the Chakra button to generate links between pages.
Featured Posts
How to deal with Docker Hub rate limit on AWS
Since 2020, DockerHub has been limited to only 200 container image pull requests per six hours. This article will help you to deal with this limitation on AWS.
How to enable Python type checking in VSCode
Python now has support for type hints. In this article, we will see how to enable better IntelliSense and type checking analysis in VSCode.
How to manage Internationalization with NextJS SSG
Staticaly generating a website with the NextJS framework in different languages is not so obvious.