GithubHelp home page GithubHelp logo

FlatList icerisindeki datalar unique id lere sahip olmalarina ragmen query atip yeni notlar diziye eklendiginde hata firlatiyor/ about choose-note-mobil HOT 8 CLOSED

ozanbatuhankurucu avatar ozanbatuhankurucu commented on June 12, 2024
FlatList icerisindeki datalar unique id lere sahip olmalarina ragmen query atip yeni notlar diziye eklendiginde hata firlatiyor/

from choose-note-mobil.

Comments (8)

ozanbatuhankurucu avatar ozanbatuhankurucu commented on June 12, 2024

Error tanimi: Encountered two children with same key.
Solution: Oncesinde keyExtractor da her bir notun id sini donerken artik index i donuyoruz.

from choose-note-mobil.

ozanbatuhankurucu avatar ozanbatuhankurucu commented on June 12, 2024

Hatanın kaynaklandıgı asıl noktanın onEndReached ın hızlı bir şekilde kaydırıldığında ardarda bazen 2-3 kez istek atıldığı tespit edilmiştir bu yüzden FlatListin onEndReached metotu tekrar konfıgure edildi.
https://stackoverflow.com/questions/53408470/flatlist-onendreached-being-called-multiple-times
Çözüm kaynağı buradan bulundu.
SearchNotes sayfasındada aynı konfigurasyonun yapılması gerekiyor. ve keyExtractor da index i dönmeyi unutma.

from choose-note-mobil.

ozanbatuhankurucu avatar ozanbatuhankurucu commented on June 12, 2024

SearchNotes sayfasida tamamlandi. Fakat Not aramasi yapildiktan sonra ilk kaydirip query atildiginda limit dusuk olursa bos dizi donuyor.

from choose-note-mobil.

ozanbatuhankurucu avatar ozanbatuhankurucu commented on June 12, 2024

SearchNotesScreen sayfasinda
Bilerek keyExtractor da item.id koyuldu eger fazladan data cekilip ayni idler gelirse uygulama patlasin diye. Cunku daha stabil
calisip calismadigi net degil test edilmesi gerekiyor hunharca.

from choose-note-mobil.

ozanbatuhankurucu avatar ozanbatuhankurucu commented on June 12, 2024

SearchNotes sayfasinda arama yapilinca hizli bir sekilde ardarda kaydirilinca fazladan not geliyor o kisim incelenecek..

from choose-note-mobil.

ozanbatuhankurucu avatar ozanbatuhankurucu commented on June 12, 2024

https://www.youtube.com/watch?v=xyzW59BQwoI
Bu ornek uygulanabilir..

from choose-note-mobil.

ozanbatuhankurucu avatar ozanbatuhankurucu commented on June 12, 2024

image
Denenebilir

from choose-note-mobil.

ozanbatuhankurucu avatar ozanbatuhankurucu commented on June 12, 2024

image
not cekme isleminin bitmesi beklenmesi gerektigi icin ek olarak bir controlTrigger eklendi ve problem cozuldu.

from choose-note-mobil.

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.