Giter Club home page Giter Club logo

Comments (5)

abouolia avatar abouolia commented on August 15, 2024 4

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.

yudonghan avatar yudonghan commented on August 15, 2024

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.

jaykhatri2020 avatar jaykhatri2020 commented on August 15, 2024

@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.

DarkcoderSe avatar DarkcoderSe commented on August 15, 2024

@yudonghan do you have any example to use in react? I'm facing issues, I'm also using NextJS's SSR.

from sticky-sidebar.

jaykhatri2020 avatar jaykhatri2020 commented on August 15, 2024

@DarkcoderSe can you please create an example in stackblitz so we can debug,

from sticky-sidebar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.