Skip to content

Commit

Permalink
- Updated docs for React > 18 #441
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarotrigo committed Dec 8, 2024
1 parent b77f0b0 commit abba578
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Quickstart Example:

```jsx
import React from 'react';
import ReactDOM from 'react-dom';
import ReactDOM from 'react-dom/client';
import ReactFullpage from '@fullpage/react-fullpage';

const Fullpage = () => (
Expand All @@ -117,14 +117,15 @@ const Fullpage = () => (
/>
);

ReactDOM.render(<Fullpage />, document.getElementById('react-root'));
const root = ReactDOM.createRoot(document.getElementById('react-root'));
root.render(<Fullpage />);
```

Fullpage.js Extension Example:

```jsx
import React from 'react';
import ReactDOM from 'react-dom';
import ReactDOM from 'react-dom/client';
import ReactFullpage from '@fullpage/react-fullpage';

// NOTE: if using fullpage extensions/plugins put them here and pass it as props
Expand Down Expand Up @@ -160,7 +161,8 @@ const Fullpage = () => (
/>
);

ReactDOM.render(<Fullpage />, document.getElementById('react-root'));
const root = ReactDOM.createRoot(document.getElementById('react-root'));
root.render(<Fullpage />);
```

Notice that when using any [fullPage.js extension](https://alvarotrigo.com/fullPage/extensions/) you'll pass the `pluginWrapper` function prop to include the file for those features before the `react-fullpage` component mounted.
Expand Down

0 comments on commit abba578

Please sign in to comment.