s1eepercat
10/8/2019 - 11:57 PM

import export / imports

PAST ES6

import React from 'react';
import './FaceRecognition.css';

const FaceRecognition = () => {
  ALL CONTENT OF JS FILE
}

>>>

in main: 

export default FaceRecognition;
export FaceRecognition;

-----------------
BEFORE ES6

const handleProfile = () => {
  ALL CONTENT OF JS FILE
}

module.exports = {
    handleProfile: handleProfile
}

>>>

in main: 

const register = require('./handleProfile.js');

-----