From 619249dce49923049c0f113df4a3412c33383d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80=20=D0=95=D1=80=D0=BC=D0=BE=D0=BB?= =?UTF-8?q?=D0=B0=D0=B5=D0=B2?= Date: Sun, 12 Jun 2022 10:54:22 +0400 Subject: [PATCH] updated peerDependencies --- README.md | 8 ++++---- package.json | 7 ++++--- src/index.js | 10 ---------- src/index.tsx | 13 +++++++++++++ 4 files changed, 21 insertions(+), 17 deletions(-) delete mode 100644 src/index.js create mode 100644 src/index.tsx diff --git a/README.md b/README.md index 8d3dea5..a5d8557 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SectionList -[![npm version](https://img.shields.io/badge/npm%20package-0.1.31-green)](https://www.npmjs.com/package/@protonko/section-list) -[![npm size](https://img.shields.io/badge/size-16.4%20kB-green)](https://www.npmjs.com/package/@protonko/section-list) +[![npm version](https://img.shields.io/badge/npm%20package-0.1.32-green)](https://www.npmjs.com/package/@protonko/section-list) +[![npm size](https://img.shields.io/badge/size-16.5%20kB-green)](https://www.npmjs.com/package/@protonko/section-list) Component for rendering sectioned lists for plain React.
@@ -78,7 +78,7 @@ The component expects a generic-type T that describes | className | Used to override a component's styles using custom classes. | string | no | | onEndReached | Called once when the scroll position gets within `onEndReachedThreshold` of the rendered content. | () => void | no | | onEndReachedThreshold | How far from the end the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. | number | no | -| renderSectionHeader | Rendered at the top of each section. | (title: {title: string, data: [T](#genericT)[]}) => ReactNode | no | -| shouldLoadData | Indicate whether to create an IntersectionObserver. | boolean | no | +| renderSectionHeader | Rendered at the top of each section. | (section: {title: string, data: [T](#genericT)[]}) => ReactNode | no | +| shouldLoadData | Indicated whether to create an IntersectionObserver. | boolean | no | | ListEmptyComponent | Rendered when the list is empty. | ReactElement | no | | ListFooterComponent | Rendered at the very end of the list. | ReactElement | no | diff --git a/package.json b/package.json index 5d8b9df..2cd61d9 100644 --- a/package.json +++ b/package.json @@ -6,19 +6,20 @@ "list", "section list" ], + "repository": "https://github.com/Protonko/section-list", "author": { "email": "probegrofanston@gmail.com", "name": "Egor Ermolaev" }, "private": false, "license": "MIT", - "version": "0.1.31", + "version": "0.1.32", "dependencies": { "core-js": "3.22.8" }, "peerDependencies": { - "react": "^16.9.0 || ^17 || ^18", - "react-dom": "^16.9.0 || ^17 || ^18" + "react": "^17.0.0 || ^18", + "react-dom": "^17.0.0 || ^18" }, "scripts": { "prepublish": "tsc", diff --git a/src/index.js b/src/index.js deleted file mode 100644 index 00b82c6..0000000 --- a/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react' -import ReactDOM from 'react-dom/client' -import App from './App' - -const root = ReactDOM.createRoot(document.getElementById('root')); -root.render( - - - -); diff --git a/src/index.tsx b/src/index.tsx new file mode 100644 index 0000000..f6c6210 --- /dev/null +++ b/src/index.tsx @@ -0,0 +1,13 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' +import App from './App' + +const rootElement = document.getElementById('root') +if (!rootElement) throw new Error('Failed to find the root element') + +const root = ReactDOM.createRoot(rootElement) +root.render( + + + +)