JavaScript rickandmorty

Open-source JavaScript projects categorized as rickandmorty

JavaScript rickandmorty Projects

  • rick-and-morty-api

    The Rick and Morty API

  • Project mention: Implementing Infinite scroll in React apps | dev.to | 2024-04-26

    import { useEffect, useState } from "react"; import axios from "axios"; import "./App.css"; import InfiniteScroll from "react-infinite-scroll-component"; import CharacterCard from "./components/Card"; function App() { const [characters, setCharacters] = useState([]); const [page, setPage] = useState(1); const [hasMore, setHasMore] = useState(true); const [totalPages, setTotalPages] = useState(1); const fetchData = async () => { if (page == totalPages + 1) { setHasMore(false); return; } // <-----------------------------------------------> // waiting for 1 second before fetching data to show loading spinner, you can skip this await new Promise((resolve) => setTimeout(resolve, 1000)); // <-----------------------------------------------> const res = await axios.get( `https://rickandmortyapi.com/api/character?page=${page}` ); setCharacters((prevPosts) => [...prevPosts, ...res.data.results]); setTotalPages(res.data.info.pages); setPage((prevPage) => prevPage + 1); }; useEffect(() => { fetchData(); }, []); return (

    Rick and Morty characters!h1> Loading...h4>} endMessage={

    Yay! You have seen it allb> p> } > {/* Map over characters array and return JSX */} {characters.map((character, index) => ( ))} InfiniteScroll> div> ); } export default App;

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

JavaScript rickandmorty related posts

  • It's not much but it's mine. Rick and Morty info app. Feedback/code review welcome!

    1 project | /r/webdev | 17 Jun 2023
  • Does anybody know the API documentation tool used to build the Rick and Morty API?

    4 projects | /r/webdev | 11 Apr 2023

Index

Project Stars
1 rick-and-morty-api 957

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com