Comments (5)
Hi @dbx834
Thanks for the detailed info, I'll take a look at the question later today
from ruuri.
Hi @dbx834
I pasted your code on Codesandbox but it doesn't reproduce your problem, am I missing some key information? If possible, can this issue be reproduced on Codesandbox? Thank u
from ruuri.
Thanks for checking it out. Your sandbox certainly is working. Yes I did miss some information. I didn't include the fact that I'm using preact
(ref) and preact-compat
(ref). My guess is that the distributed ES5 code doesn't have the proper references (to preact
). This is not really the function of the wrapper, to be compatible with Preact. I'll go more into it and write again soon, and this time with a sandbox if there's still an error. I'll also write if I'm able to find a workaround.
from ruuri.
So, I was able to sort it out.
I use this gatsby plugin, which replaces or updates references to these react libraries with the appropriate preact
libraries at runtime.
The issue, as I guessed, was because of this. Precisely – because at runtime a reference couldn't be found in the code. How I solved it was that I copied the files in your source folder and used them as the component instead of the packaged files. Then, I just added a reference to React in DraggableGrid.tsx
and DraggableItem.tsx
, and it works.
This is a weird, rare issue. Noting it for someone else who maybe up against it.
Thanks, once again, @vingeraycn!
from ruuri.
So, I was able to sort it out.
I use this gatsby plugin, which replaces or updates references to these react libraries with the appropriate
preact
libraries at runtime.The issue, as I guessed, was because of this. Precisely – because at runtime a reference couldn't be found in the code. How I solved it was that I copied the files in your source folder and used them as the component instead of the packaged files. Then, I just added a reference to React in
DraggableGrid.tsx
andDraggableItem.tsx
, and it works.This is a weird, rare issue. Noting it for someone else who maybe up against it.
Thanks, once again, @vingeraycn!
I'm glad to see the progress of the problem. I think this may have something to do with the concept of ruuri
. ruuri
relies on React's runtime, but does not mix React when packaging, but chooses to rely on the React version of the user's current project. It was true that Preact was not considered at first, but thank you for exposing it. @dbx834
from ruuri.
Related Issues (10)
- Compiling issues with React^17.0.2 HOT 2
- export 'useInsertionEffect' (imported as 'React') was not found in 'react' HOT 5
- Dynamically resize items HOT 20
- No animation when items are added/removed/showing/hiding HOT 3
- Grid works incorrectly without `<React.StrictMode>` HOT 1
- Problem with percentage width on grid items HOT 6
- Support "propsToData" property like muuri-react lib
- The value of dragEnabled property can't update using hook HOT 3
- The element did not rerender HOT 2
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 ruuri.