JSX is a form of markup used in React. It looks very similar to HTML, but is converted to JavaScript behind the scenes. You are not required to use JSX, but JSX makes it easier to write React applications.
const welcomeElement = Hey man!;
| const path = require('path'); | |
| const express = require('express'); | |
| const app = express(); | |
| // DEFINES A FOLDER FOR THE STATIC FILES | |
| app.use(express.static('public')); | |
| // DEFINES THE MAIN ENTRY POINT |
| // 1.Bind in constructor | |
| class A extends React.Component { | |
| constructor(props) { | |
| super(props) | |
| this._eventHandler = this._eventHandler.bind(this) | |
| } | |
| _eventHandler() { | |
| // ... | |
| } |
| <tr> | |
| <td style='text-align:center;vertical-align:top;padding:.6em;'>1</td> | |
| <td style='text-align:left;vertical-align:top;padding:.6em;'> | |
| #123459 <br/> | |
| <span style='color:#777;'>billed on </span> | |
| 31/05/1992 | |
| </td> | |
| <td style='text-align:center;vertical-align:top;padding:.6em;'>Unpaid</td> | |
| <td style='text-align:center;vertical-align:top;padding:.6em;'>31/05/1992</td> | |
| <td style='text-align:right;vertical-align:top;padding:.6em;'>₹5000</td> |
| // There are three possible states for our login | |
| // process and we need actions for each of them | |
| export const LOGIN_REQUEST = 'LOGIN_REQUEST' | |
| export const LOGIN_SUCCESS = 'LOGIN_SUCCESS' | |
| export const LOGIN_FAILURE = 'LOGIN_FAILURE' | |
| function requestLogin(creds) { | |
| return { | |
| type: LOGIN_REQUEST, | |
| isFetching: true, |
| import request from 'superagent'; | |
| export const GET_LOGGED_USER = 'GET_LOGGED_USER'; | |
| export const SET_LOGGED_USER = 'SET_LOGGED_USER'; | |
| export const login = (response) => ({ | |
| type: SET_LOGGED_USER, | |
| logged: true, | |
| payload: response | |
| }) | |
| export const getLoggedUser = () => ({ |
| { | |
| "presets": [ | |
| [ | |
| "env", | |
| { | |
| "targets": { | |
| "browsers": ["last 2 versions"] | |
| }, | |
| "debug": true | |
| } |
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user