In this article, you will learn the basic prerequisites required to set up the environment to develop SharePoint Web parts, using React JS with the help of offline ReactJS compilers.
Using the third party plugins available on the Cloud. I have explained about the same in my previous article.
Using the third party offline compilers available. In this article, we will see the implementation.
In my previous articles, you will have seen the basics of React library and injecting React library components to the content editor Web parts with online React component compilers.
The babel compiler modules are required to translate JSX code, which are being imported, using NPM commands.
Subsequently, the babel commands are used to translate the content, using babel compiler.
Any IDE can be used to manage the files/project. In this approach, I will be using Visual code IDE.
React JSX Transformer For each project, the babel plugin modules needs to be imported. The module can be imported, using NPM command. The snippet given below shows the command to install/import the babel modules. Navigate to the respective project folder and run the command, using the command prompt.
npm install --save-dev babel-plugin-transform-react-jsx
The image given below shows the import step.