Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@raddo/easy-instagram-feed

RadovanPelka10MIT1.0.2

An easy-to-use and simple Instagram package that allow you to fetch media content without API and access token.

npm, instagram, feed, insta, instafeed, raddo, @raddo, @raddo/easy-instagram-feed, fetch, typescript, simple, easy

readme

An easy-to-use and simple Instagram package that allow you to fetch media content without API and access token.

Install

$ npm install @raddo/easy-instagram-feed
 or
$ yarn add @raddo/easy-instagram-feed

Usage

import React from "react";

import getInstagramFeed, {
  InstagramFeedType,
} from "@raddo/easy-instagram-feed";

type InstaType = InstagramFeedType | null;

const Index: React.FC = () => {
  const [instaFeed, setInstaFeed] = React.useState<InstaType>(null);

  React.useEffect(() => {
    getInstagramFeed("natgeotravel").then(feed => setInstaFeed(feed));
  }, []);

  if (!instaFeed) return null;

  return (
    <>
      <h1>National Geographic Travel</h1>
      <span>
        It’s a big world. Explore it through the lens of our photographers.
      </span>
      {instaFeed.map((image, index) => (
        <img
          key={index}
          src={image.src}
          alt={image.alt}
          onClick={() => window.open(image.url, "_blank")}
        />
      ))}
    </>
  );
};

alt text

Maintainer

Radovan Pelka (Rado)

| Radovan Pelka