React JSX and Helmet

Sharing is Caring

Wearing a helmet saves you from coming harm!

Well, not always! (d’oh)

But, using Helmet(npm plugin) in a React JSX application saves time ­čÖé

It’s usage is pretty simple;┬á install the plugin, import the library and implement the structure.

First things first, we start with installing  the helmet plugin:

Import the library:

Note that we’ve also imported “react”. Any React plugin needs its core library defined first. So;┬á if you haven’t already, don’t forget to add it.

Next thing is its usage form. Let’s add these html code to our Helmet:

Helmet form:

which will give the same output once it runs via web browser:

That’s it folks!

Talked to many people about the JSX in React. Some people like to mix HTML with React code and some don’t. Honestly, I find this form pretty and easy to understand (even for front-end developers)


But, this is a matter for another blog post.

Thanks for reading