
Software Developer 👨💻| Love @javascript | Tweets are about React and web development | Follow my journey✌🏻
Joined January 2020
- Tweets215
- Following611
- Followers1.2K
- Likes7.4K
Pinned Tweet
A Simple Budget Calculator Using Vanilla JavaScript 😊
#javascript #CodeNewbies #100DaysOfCode #programming #webdevelopment
Virtual Dom Diffing in React -
When the VDOM gets updated, React compares it to to a previous snapshot of the VDOM and then only updates what has changed in the real DOM. If nothing changes the real DOM wouldn't be updated at all this proces is called VDOM diffing .
#reactjs
A thread on how React works behind the scenes 🧵
* React doesn't know anything about the web , infact it knows nothing about the browser at all .
React only knows how to work with components , but it doesn't care whether the components contains HTML or anything else.
#ReactJS
1
5
Sometimes Javascript makes me feel like I am a genius and sometimes it makes me feel insane.
#javascript #webdev #programming
React tip -
* You can store JSX content in a variable .
Example
const content = <h2> I am Jsx content</h2>
#react #javascript #webdev #100DaysOfCode
What are props in React ?
* Props allow us to pass data between different components.
* Props are used to make a component reusable by passing data to it.
* Think of it as parameters of a function , which are passed to make a function reusable.
#react #webdev #100DaysOfCode
What is JSX in React ?
1- Firstly it's not HTML
2- JSX is JavaScript XML, an extension of JavaScript that allows us to write HTML in React.
#webdev #React #100DaysOfCode
What is a React Component ?
*React is all about components
*Components are independent and reusable pieces of code .
*They are same as javascript functions but they return JSX via a render() function .
#React #100DaysOfCode #webdev
Way to change the size of thread pool in #Nodejs 👇
It can be changed at startup time by setting the UV_THREADPOOL_SIZE environment variable to any value.
process.env.UV_THREADPOOL_SIZE = Number of threads (absolute max is 128).
#javascript #CodeNewbie #100DaysOfCode #code
What is thread pool in #Nodejs?
*Node js is single threaded so in order to prevent event loop from blocking , event loop offloads heavy tasks to the thread pool .
*Thread pool provides 4 extra threads for execution but can be increased .
#javascript #CodeNewbie #100DaysOfCode
What is Event Loop in #Nodejs?
*In one line Event Loop is the heart of our node js application
*The event loop is what allows Node.js to perform non-blocking I/O operations despite the fact that JavaScript is single-threaded .
#javascript
#CodeNewbie #100DaysOfCode
Someone please explain this to me 👇
* What is the use of console.error() for displaying error although the same can be done using console.log() ?
#javascript #programming #100DaysOfCode
Reading and writing files using #javascript
* Include file system module
const fs = require('fs')
*Synchronous way to read and write 👇
fs.readFileSync( path, options )
fs.writeFileSync( file, data, options )
*Asynchronous way to read and write 👇
fs.readFile( filename, encoding, callback_function )
fs.writeFile( file, data, options, callback )
#100DaysOfCode #nodejs #programming #webdevelopment
What is Node js ?
*Its a javascript runtime in which a program written in javascript can be executed but outside of the browser .
*V8 engine runs the javascript code in Node js .
#javascript #CodeNewbie #Nodejs
#programming #100DaysOfCode