Since TS-Toolkit Navigators' listeners are currently handled internally by StatefulReader, it is not possible to customize them, or even retrieve some useful data such as the current location on positionChanged or the text selected, etc. if you need to sync it on a remote server.
The challenge lies in the complexity that must be handled so that Navigator is not reloaded frantically on state updates/re-renders – hence the stateless cache, etc.
At minimum, StatefulReader should have on props so that external consumers can react to events for which it is significant to retrieve data.
Ideally you should be able to customize them, but as aforementioned we need something for stateless cache as a prerequisite.
Since TS-Toolkit Navigators' listeners are currently handled internally by
StatefulReader, it is not possible to customize them, or even retrieve some useful data such as the current location onpositionChangedor the text selected, etc. if you need to sync it on a remote server.The challenge lies in the complexity that must be handled so that Navigator is not reloaded frantically on state updates/re-renders – hence the stateless cache, etc.
At minimum,
StatefulReadershould haveonprops so that external consumers can react to events for which it is significant to retrieve data.Ideally you should be able to customize them, but as aforementioned we need something for stateless cache as a prerequisite.