`Konva` may lost ids reference while react reconciler works
See original GitHub issueCaught on a large production web app.
Try update this structures:
layer
-> shape with id1
-> shape with id2
To this:
layer
group
-> shape with id1
-> shape with id2
Then try to find a node by id from a stage.
In this case, React will:
- create new elements (group and shapes)
- delete old shapes
- insert new group and shapes
So new shapes will be created BEFORE old shapes are destroyed. That means same id
will be used twice. In this scenario, Konva
will lose references to new shapes by ids.
So this code stage.find('#id1')
will return undefined. That is the bug.
So direct searching of nodes is broken.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How React Reconciliation Works | CSS-Tricks
Reconciliation is the process through which React updates the DOM. When a component's state changes, React has to calculate if it is necessary ......
Read more >MobX Quick Start Guide
jQuery, konva.js, Next.js, Vue.js, and even Backbone. When working through the book, you will discover that the concepts required to use a tool...
Read more >Untitled
#Datdudebp 911 first responders gamespot, Eating meat during lent rules! Leotards australia ballet, Staropoli law offices llc, Mat2riel de cuisine, ...
Read more >开发工具 - 超级架构师
node-video-lib - Pure JavaScript library for working with MP4 and FLV video files and creating MPEG-TS chunks for HLS streaming. basic-ftp – FTP/FTPS...
Read more >comments
Hi HN,. I am the developer behind SpreadSheet Grid. It's a React Library for users who want to develop an Excel-like DataGrid in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should be fixed.
konva@3.2.2
is using a newcontainer.find('#id')
algorithm that should not produce such weird results.how about using ‘name’ like this ?