Comments (5)
I tested it with Webpack and it works without any error, i'm pretty sure the wrong with your config code.
This is code of my test with Webpack.
import StickySidebar from './node_modules/sticky-sidebar'
;
var sidebar = new StickySidebar('#sidebar', {
bottomSpacing: 20,
topSpacing: 20,
containerSelector: '.container',
innerWrapperSelector: '.sidebar__inner'
});
from sticky-sidebar.
I found the same issue, the reason is my project use server render React component, so 'window' undefined will stop the server, resolve is to require in componentDidMount()
from sticky-sidebar.
@abouolia Thanks for a simple solution but difficult to find on Google :)
I am using sticky-sidebar-v3 and the same solution work in Angular 16.
from sticky-sidebar.
@yudonghan do you have any example to use in react? I'm facing issues, I'm also using NextJS's SSR.
from sticky-sidebar.
@DarkcoderSe can you please create an example in stackblitz so we can debug,
from sticky-sidebar.
Related Issues (20)
- Calculated topSpacing
- Out wrapper get height of inner wrapper when affixed
- How to disable sticky sidebar on small devices? HOT 3
- Sidebar font size change on mobile devices
- StickySidebar not updating after update html content inside HOT 2
- having conflict issue
- should be support.transform not support.translate
- Hide on small screens
- resizeSensor not working
- Having sidebar width always fitting the whole page's width HOT 2
- Documentation issue on website
- Calc isSidebarFitsViewport
- Are there any WordPress plugins using this code?
- On page website don't re-initilize the side bar HOT 1
- How to use a declarative approach? So that you don't have to call the JS class?
- Pure css alternative of js sticky sidebar HOT 1
- Lots of wrong versions floating around on the web
- Not working in scenario where the normal scroll section changes height or is accordion
- The column jumps up and down recursively
- Sidebar sticky very late
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sticky-sidebar.