Skip to content

Commit

Permalink
Add support for React v18
Browse files Browse the repository at this point in the history
  • Loading branch information
MonsieurV committed Apr 11, 2022
1 parent c3e02da commit f1120b1
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 52 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Removed support for depecrated `extraAriaContext` (please use `ariaLabelBuilder` instead)

## >= 8.1.3

- Support React 18 (see: https://github.com/AdeleD/react-paginate/issues/423)

## >= 8.1.2

- Excluded unnecessary files from package (see: https://github.com/AdeleD/react-paginate/pull/410)
Expand Down
9 changes: 5 additions & 4 deletions demo/js/demo.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import PropTypes from 'prop-types';
import ReactPaginate from 'react-paginate';
import styled from 'styled-components';
Expand Down Expand Up @@ -172,7 +172,8 @@ export class App extends Component {
}
}

ReactDOM.render(
<App url={'http://localhost:3000/comments'} author={'adele'} perPage={6} />,
document.getElementById('react-paginate')
const container = document.getElementById('react-paginate');
const root = createRoot(container);
root.render(
<App url={'http://localhost:3000/comments'} author={'adele'} perPage={6} />
);
84 changes: 40 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-paginate",
"version": "8.1.2",
"version": "8.1.3",
"description": "A ReactJS component that creates a pagination.",
"main": "./dist/react-paginate.js",
"repository": {
Expand All @@ -24,7 +24,7 @@
"prop-types": "^15.6.1"
},
"peerDependencies": {
"react": "^16 || ^17"
"react": "^16 || ^17 || ^18"
},
"devDependencies": {
"@babel/core": "^7.15.8",
Expand All @@ -42,8 +42,8 @@
"jest-cli": "^27.3.1",
"jquery": "^3.6.0",
"prettier": "^2.4.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18",
"react-dom": "^18",
"react-hot-loader": "^4.13.0",
"serve-static": "^1.14.1",
"styled-components": "^5.3.3",
Expand Down

0 comments on commit f1120b1

Please sign in to comment.