GithubHelp home page GithubHelp logo

sibiraj-s / react-layout-masonry Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 0.0 2.24 MB

Responsive masonry layout for React

Home Page: https://sibiraj-s.github.io/react-layout-masonry/

License: MIT License

Shell 1.76% TypeScript 98.24%
react react-layout react-masonry

react-layout-masonry's People

Contributors

dependabot[bot] avatar sibiraj-s avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-layout-masonry's Issues

`document` cannot be found

Attempting to use Next.js v13.4.2 and errors out in browser with ReferenceError: document is not defined

Empty space accumulation at the end of masonary

Using react18 with nextjs13.5, importing without SSR like so: const Masonry = dynamic(() => import('react-layout-masonry'), { ssr: false });

Images are not placed correctly, resulting in accumulation of empty space as more images are loaded.

Issue still persists if all images are loaded at once (not added dynamically as seen in the clip)

See clip here: https://streamable.com/72rnz1

Adding support for SSR

This is a great lightweight package. But it's currently limited to client side only. Will you consider adding support for SSR. For example adding a defaultColumns prop when there is a User-Agent header, then client side hydration once the window sizes are available.

Typescript Error

Just thought I'd note this. The component is working, but I get this typescript error.

'Masonry' cannot be used as a JSX component.
Its return type 'ReactNode' is not a valid JSX element.
Type 'undefined' is not assignable to type 'Element | null'.ts(2786)

this is with NEXT (app router) 13.5.3 Typescript 5.1.6

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.