ecency-mobile
ecency-mobile copied to clipboard
fix crash while creating post
duplicate of #2316
It's not duplicate actually, the first one related to assessing the issue only, not fixing it.
@feruzm
My assessment on text input show that the real issue is with out Editor screen and not with TextInput... I stripped editor screen of everything there was other than texinput and a button to use setNativeProps.
Editor worked fine for first 3000 words even with setNativeProps used... after adding anther 3000 words a total of 6000 words, textinput was not as responsive but was usable, although even 3000 is like a loooot words for a mobile writer imo..
Bottom line is, instead of writing our own text input, may we should see how we can optimise the editor screen itself as otherwise I doubt we will gain any improvement to Editor screen with any kind change in TextInput be is web variant or native.
https://user-images.githubusercontent.com/6298342/172148558-8f61334d-73f9-47ca-a9f9-ad81c942fb60.mov
@noumantahir Great find, would be good time to check all props of editor screen and optimize it then or rewrite new editor screen and replace old one, move important methods and keep structure clean 👍
Some quick fixes to implement
- [x] reduce frequency of validity check
- [x] reduce frequency of local draft save
- [x] optimise username check
- [ ] update modals to unmount content after closure
- ~~Uploads modal~~
- snippets modal
- community modal
- Thumb selection modal
- Basic Header modals
- [ ] bypass state setting routines on text change