Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-swr-infinite-scroll

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-swr-infinite-scroll - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

components/index.d.ts

116

package.json
{
"name": "react-swr-infinite-scroll",
"license": "MIT",
"version": "1.0.0",
"version": "1.0.1",
"private": false,

@@ -16,13 +16,8 @@ "description": "Infinite scrolling with useSWRInfinite",

},
"scripts": {
"build": "yarn clean; rollup -c",
"clean": "rimraf dist",
"dev": "yarn storybook",
"format": "prettier --write \"src/**/*.{ts,tsx,json,js,jsx}\"",
"format:check": "prettier --list-different \"src/**/*.{ts,tsx,json,js,jsx}\"",
"lint": "yarn lint:script",
"lint:script": "eslint ./src --ext .js,.jsx,.ts,.tsx",
"storybook": "start-storybook -p 9001 -s ./src/assets -c .storybook",
"publish": "npx semantic-release --no-ci"
},
"keywords": [
"react",
"swr",
"infinite scroll",
"hooks"
],
"main": "index.js",

@@ -37,100 +32,3 @@ "module": "index.esm.js",

"react-dom": "^16.8.0"
},
"devDependencies": {
"@babel/core": "^7.12.7",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@rollup/plugin-commonjs": "^16.0.0",
"@rollup/plugin-node-resolve": "^10.0.0",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/npm": "^7.0.8",
"@semantic-release/release-notes-generator": "^9.0.1",
"@storybook/react": "^6.1.2",
"@testing-library/react": "^11.2.2",
"@types/classnames": "^2.2.11",
"@types/node": "^12",
"@types/react": "^16.9.10",
"@types/react-dom": "^16.9.10",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
"babel-loader": "^8.2.1",
"classnames": "^2.2.6",
"conventional-changelog-conventionalcommits": "^4.4.0",
"css-loader": "^5.0.1",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"identity-obj-proxy": "^3.0.0",
"node-sass": "^5.0.0",
"prettier": "^2.2.0",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"rimraf": "^3.0.2",
"rollup": "^2.33.3",
"rollup-plugin-copy": "^3.3.0",
"rollup-plugin-postcss": "^3.1.8",
"rollup-plugin-terser": "7.0.2",
"rollup-plugin-typescript2": "^0.29.0",
"sass-loader": "^10.1.0",
"semantic-release": "^17.3.0",
"style-loader": "^2.0.0",
"swr": "^0.5.6",
"ts-loader": "^8.0.11",
"typescript": "^3.8.3",
"webpack": "^4.42.1"
},
"engines": {
"node": ">=12.0.0",
"yarn": "^1.5"
},
"release": {
"branches": [
"main",
"next"
],
"preset": "conventionalcommits",
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"releaseRules": [
{
"type": "revert",
"release": "patch"
},
{
"type": "build",
"release": "patch"
}
]
}
],
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogTitle": "# Changelog"
}
],
[
"@semantic-release/npm",
{
"pkgRoot": "dist"
}
],
[
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.version} [skip ci]",
"assets": [
"CHANGELOG.md"
]
}
]
]
}
}
# SWR Infinite Scroll
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

@@ -8,2 +9,6 @@ > An easier way to `useSWRInfinite`

## Demo
Visit the demo storybook [here](https://react-swr-infinite-scroll.vercel.app/).
## Features

@@ -56,3 +61,3 @@

children: React.ReactChild | ((item: T) => React.ReactNode);
loadingIndicator: React.ReactNode;
loadingIndicator?: React.ReactNode;
endingIndicator?: React.ReactNode;

@@ -66,4 +71,4 @@ isReachingEnd: boolean | ((swr: SWRInfiniteResponse<T>) => boolean);

- `children`: could either be a regular react child that uses the data from the original swr object itself, or a function that renders the list items passed from the `InfiniteScroll` component
- `loadingIndicator`: A react node to be displayed when the list is loading
- `isReachingEnd`: A function / boolean value to tell if the list is reaching its end (see examples for a better idea of how `isReachingEnd` should be implemented)
- (optional) `loadingIndicator`: A react node to be displayed when the list is loading
- (optional) `endingIndicator`: A react node to be displayed when the list is reaching its end

@@ -145,3 +150,3 @@ - (optional) `offset`

Copyright 2012 Eunsoo Shin (esinx)
Copyright 2021 Eunsoo Shin (esinx)

@@ -148,0 +153,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc