Coder Social home page Coder Social logo

Comments (5)

BlueRexPY avatar BlueRexPY commented on May 18, 2024 4

Try to use this in your webpack config, it worked for me

{
        test: /\.js$/,
        include: [path.resolve(__dirname, 'src'), /node_modules[\/]@?react-virtualized-auto-sizer/],
        use: {
          loader: 'babel-loader',
          options: {
            presets: [['@babel/preset-env', { modules: false }], '@babel/preset-react'],
            plugins: ['@babel/plugin-proposal-class-properties'],
          },
        },
      },

from react-virtualized-auto-sizer.

bvaughn avatar bvaughn commented on May 18, 2024 1

Try 1.0.11 (just published). Hopefully it fixes this. If not, please share a repro!

from react-virtualized-auto-sizer.

floriancargoet avatar floriancargoet commented on May 18, 2024

I have the same issue, but it's when I run storybook (which uses webpack & babel).

from react-virtualized-auto-sizer.

bvaughn avatar bvaughn commented on May 18, 2024

Sorry about the unexpected change in a minor release 🙇🏼 It wasn't intentional, just an oversight.

It would be helpful to have a repro so I could verify if a change on my side fixes this.

I think that using the @babel/plugin-proposal-class-properties plugin might fix this (which I did in 0d2201a).

from react-virtualized-auto-sizer.

rybesh avatar rybesh commented on May 18, 2024

Was there a switch from an older version of Babel?

I’m using browserify and importing like this:

AutoSizer = require('react-virtualized-auto-sizer')

The error I get (even with 1.0.11) is:

[Error] Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
[Error] Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Changing to:

AutoSizer = require('react-virtualized-auto-sizer’).default

… fixes the issue.

from react-virtualized-auto-sizer.

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.