React.js


React.js environment for development

React.js environment for development


React & Webpack 4 From Scratch - No CLI

React & Webpack 4 From S cratch - No CLI


Some open source react projects;


https://bitbucket.org/marley-react/codedojo-react-basics-part1


https://bitbucket.org/marley-react/codedojo-react-basics-part2


https://bitbucket.org/marley-nodejs/learning-full-stack-javascript-development-mongodb-node-and


New react app can be created by next command

-- no typo
$ npx create-react-app myApp


Component life cycle

componentDidMount
componentWillUnmount


Possible SPA routing script


const express = require('express');
const path = require('path');

const server = express();

server.use(express.static('public'));

server.get('*', (req, res) => {
  fs.readFile(`${__dirname}/dist/index.html`, (err, html) => {
    if (error) throw error;

    res.setHeader('Content-Type', 'text/html');
    res.end(html);
  });
});

server.listen('8080', () => {
  console.log('Express listening on port 8080');
});