Skip to content

Instantly share code, notes, and snippets.

View linuxdotexe's full-sized avatar
:octocat:
at this point, i have no idea

sai nivas mangu linuxdotexe

:octocat:
at this point, i have no idea
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);