React- Reusable modal component

We can create reusable modal component without importing additional library.

In this demo, We create a single component and passing the Modal Title and Contents through props from parent component. I use Bootstrap 4 for better UI.




React- Some important core concepts with example

Codebase to cover the following core concepts with simple program i.e To display quote message upon button click.

It helps to recall the react core concepts quickly.


Build react app in Nginx (Without Nodejs)

Beginners are confused if React can work without NodeJS. The answer is Yes.

React (also known as React.js or ReactJS) is a JavaScript library; and thus considered a client-side library, will work without application servers like FCM, Tomcat, and/or NodeJS.  However, NodeJS still plays an important role to bundle the JS files as well as convert JSX and ES6 to ES5.

In my case, I have NodeJS on my local but not on live server. Here we can bundle the files in local and deploy to live server.

In create-react-app starter kit, when you run the following command, it creates the bundled/production version inside “build” directory

I deployed the code in live server with the following NGINX configuration. it serves the file from “bundle” directory.


Source Code:

© 2019 Asik Blog

Theme by Anders NorenUp ↑