codingtcher.com
Theme Night
Home
Login

install node modules react

Home » Tutorial Post » install node modules react

A Node Module For ReactJS

node_modules/thing/index.js
 let x = "SSSSSS";
 let y = "SSSSWWWWW";
 let z = function()
 {
 	alert("ZZZZZ");
 }
 exports.x = x;
 exports.y = y;
 exports.z = z;
  
 
  App.js
  
  import logo from './logo.svg';
import './App.css';

import {useEffect} from 'react';
import {x,y,z} from 'thing';
function App() {


  useEffect(()=>{

alert(x);
z();
  })

Related Post