Comments (6)
Hello Guys.
Please check out the new v3.0.0 version just published. In addition to a number of performance and bundle size improvements, the problem you reported has been fixed.
from react-plock.
Can you please provide your next version?
from react-plock.
Sure: Next.js v12.0.8
from react-plock.
To make Plock work fine I use this code with js and no typescript:
import Card from './card'
import dynamic from 'next/dynamic'
const Plock = dynamic(
import('react-plock').then((mod) => mod.Plock),
{ ssr: false }
)
export default function BodySuppliers({
hits,
toggleModal,
addedClasses = '',
}) {
const breakpoints = [
{ size: 640, columns: 1 },
{ size: 768, columns: 2 },
{ size: 1024, columns: 3 },
{ size: 1280, columns: 4 },
{ size: 1536, columns: 6 },
]
return (
<div className={`${addedClasses}`}>
<Plock nColumns={breakpoints} gap={15}>
{hits.map((hit) => (
<div key={hit.objectID} className="max-w-[250px]">
<Card hit={hit} toggleModal={toggleModal} />
</div>
))}
</Plock>
</div>
)
}
from react-plock.
while running npm run build
i got a similar error
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/user/Documents/work/myproject/node_modules/react/jsx-runtime'
imported from /home/user/Documents/work/myproject/node_modules/react-plock/index.js Did you mean to import react/jsx-runtime.js?
i resolved it by reaching into /node_modules/react-plock/index.js and changing
the first line from
import { jsx } from 'react/jsx-runtime';
to
import { jsx } from 'react/jsx-runtime.js';
ofcourse this might not be an ideal solution.
from react-plock.
I love this lib ! Thank you
from react-plock.
Related Issues (17)
- The automated release is failing 🚨 HOT 1
- It is not feasible for a react app created in typescript HOT 3
- Build fails on Gatsby project - WebpackError: ReferenceError: window is not defined HOT 3
- Breakpoints with Gap setting HOT 3
- UseLayoutEffect warning in NextJs HOT 2
- Plock grid re-hydration on URL search query change in Next.js, which might cause a delay in onClick events of grid items. HOT 2
- Error when doing `npm install` for most recent React version HOT 3
- <Plock className="hhh"> clasName is invalid HOT 1
- typo in grid declaration HOT 1
- Possibile to get the real index (idx) ? HOT 3
- Plock images in rows HOT 3
- Different column width HOT 1
- Flickering issue on initial render HOT 2
- How to switch columns by state? HOT 2
- Longer elements mess up column layouts HOT 2
- could you please support the ssr render in nextJS ?
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 react-plock.