also looking at this
fix(native): preserve authored keys in mutation nodes
#2084
3 files
+77
-3
| @@ -112,6 +112,8 @@ export interface RenderPayload { | ||
| 112 | 112 | |
| 113 | 113 | export interface NativeMutationNode { |
| 114 | 114 | type: string |
| 115 | /** Authored reconciliation identity, retained across native mutations. */ | |
| 116 | key?: string | |
| 115 | 117 | props?: Record<string, unknown> |
| 116 | 118 | style?: Partial<import('../compiler/ir').STXStyle> |
| 117 | 119 | events?: Record<string, string> |
| @@ -121,7 +123,7 @@ export interface NativeMutationNode { | ||
| 121 | 123 | |
| 122 | 124 | export type NativeMutationOperation |
| 123 | 125 | = | { op: 'createNode', id: string, node: NativeMutationNode, root?: boolean } |
| 124 | | { op: 'updateNode', id: string, patch: Omit<NativeMutationNode, 'type'> } | |
| 126 | | { op: 'updateNode', id: string, patch: Omit<NativeMutationNode, 'type' | 'key'> } | |
| 125 | 127 | | { op: 'insertChild', parentId: string, childId: string, index: number } |
| 126 | 128 | | { op: 'moveChild', parentId: string, childId: string, index: number } |
| 127 | 129 | | { op: 'removeNode', id: string } |