Skip to content

Instantly share code, notes, and snippets.

View abcdeepakr's full-sized avatar
🏋️
kaam karo vyast raho

Deepak Rawat abcdeepakr

🏋️
kaam karo vyast raho
View GitHub Profile
@onedebos
onedebos / App.jsx
Last active July 21, 2023 10:47
How to implement a load more button in React
import React, { useState, useEffect } from "react";
import Posts from "./Posts";
import posts from "./postsArray";
const postsPerPage = 3;
let arrayForHoldingPosts = [];
const App = () => {
const [postsToShow, setPostsToShow] = useState([]);
const [next, setNext] = useState(3);

Interview Questions

Node.js

Q1: What do you mean by Asynchronous API? ☆☆

Answer: All APIs of Node.js library are aynchronous that is non-blocking. It essentially means a Node.js based server never waits for a API to return data. Server moves to next API after calling it and a notification mechanism of Events of Node.js helps server to get response from the previous API call.

Source: tutorialspoint.com