alvarotrigo / alvarotrigo/react-fullpage

Having an Issue with Active class, react-fullpage

未关闭
#388 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
reproduction required
主要语言
JavaScript
星标
1.3k
派生
172
PR 合并指标
30 天内没有已合并 PR

描述

I am trying to use the active class for two slides. I am using react with Vite in Dev mode. I am not getting the expected results.

According to the https://github.com/alvarotrigo/fullPage.js, If you want to define a different starting point rather than the first section or the first slide of a section, just add the class active to the section and slide you want to load first.

```js
function App() {

return (
{
return (



Slide 1




Slide 2, Want this to show first





);
}}
/>
);
}
ReactDOM.createRoot(document.getElementById('root')).render(


,
)
```

### Versions
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@vitejs/plugin-react": "^3.1.0",
"vite": "^4.1.0"

As I was writing this I figured out that React.StrictMode was preventing Active class to have it's expected results. Simply removing React.StrictMode fixed it.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。