alvarotrigo / react-fullpage

Official React.js wrapper for fullPage.js https://alvarotrigo.com/react-fullpage/
GNU General Public License v3.0
1.29k stars 178 forks source link

Re-render component on changing slides #320

Closed devtodep closed 2 years ago

devtodep commented 2 years ago

My ReactFullpage.Wrapper setup has 4 sections, which are rendered all at once. Is it possible to render only the component for the current active section and destroy all other section components which are not active. I tried a small setup using useState. But it throws the following error, when I try to render a specific component for that section.

[React DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node](https://stackoverflow.com/questions/54880669/react-domexception-failed-to-execute-removechild-on-node-the-node-to-be-re)
alvarotrigo commented 2 years ago

. Is it possible to render only the component for the current active section and destroy all other section components which are not active.

fullPage.js won't provide that out of the box. However, you might be able to do it by yourself using React?