Use the fs Module in React using Prevail to Access System Files

preview_player
Показать описание

===Terminal===
npm i babel-plugin-preval

===Javascript===
import React from 'react';
import preval from 'babel-plugin-preval/macro';

const handleClick = ()=❯{

const output1 = preval`
const fs = require('fs');
`

let x = 'This is another another another test'
preval`
const fs = require('fs');
`
}

const handleClick2 = ()=❯{

let output2 = preval`
const fs = require('fs');
`
}

const handleClick3 =()=❯{

const output3 = preval`
const fs = require('fs');
`

};

===HTML===
❮button onClick={()=❯handleClick()}
style={{fontSize:'30px'}}❯
Click me
❮/button❯

❮br/❯
❮br/❯

❮button onClick={()=❯handleClick2()}
style={{fontSize:'30px'}}❯
Click me 2
❮/button❯

❮br/❯
❮br/❯

❮button onClick={()=❯handleClick3()}
style={{fontSize:'30px'}}❯
Click me 3
❮/button❯

DONATE:
---------------
BTC: 3EUQBWZKX9Vcwdffd3cUGATQopxrAQQxJ9
LTC: MBXE6hJgxxFYSD8SjmR7sHCHGTqFXmNGoU
Рекомендации по теме
Комментарии
Автор

hi, it is not working for save json data

gauravvarshney
Автор

Hi, that doesn't run trying to modify a .json, :'(

stevensongrajales
join shbcf.ru