isographlabs / isograph

The UI framework for teams that move fast — without breaking things.
MIT License
202 stars 9 forks source link

[Epic] Granular re-rendering #44

Open rbalicki2 opened 2 months ago

rbalicki2 commented 2 months ago

Components should only re-render if the data that is passed to the component actually changes. Currently, everything re-renders, which is bad for perf.

rbalicki2 commented 2 months ago

https://x.com/StatisticsFTW/status/1780169047465971813 this is a description of how granular re-rendering will work

rbalicki2 commented 2 months ago

Initial implementation is done. Remaining tasks: [ ] have special handling for store[ROOT_ID]. Keep track of the specific fields that were modified on the root object, and handle those specially. In other words, WithEncounteredRecords<T> should be

export type WithEncounteredRecords<T> = {
  readonly encounteredRecords: Set<DataId>;
  readonly encounterdRootRecords: Set<FieldNameAndArguments>;
  readonly item: T;
};

[ ] unit tests