mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-10-26 01:14:21 +02:00 
			
		
		
		
	fix: memoize static canvas on props.renderConfig (#7131)
				
					
				
			This commit is contained in:
		| @@ -114,11 +114,13 @@ const areEqual = ( | |||||||
|     return false; |     return false; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return isShallowEqual( |   return ( | ||||||
|     // asserting AppState because we're being passed the whole AppState |     isShallowEqual( | ||||||
|     // but resolve to only the StaticCanvas-relevant props |       // asserting AppState because we're being passed the whole AppState | ||||||
|     getRelevantAppStateProps(prevProps.appState as AppState), |       // but resolve to only the StaticCanvas-relevant props | ||||||
|     getRelevantAppStateProps(nextProps.appState as AppState), |       getRelevantAppStateProps(prevProps.appState as AppState), | ||||||
|  |       getRelevantAppStateProps(nextProps.appState as AppState), | ||||||
|  |     ) && isShallowEqual(prevProps.renderConfig, nextProps.renderConfig) | ||||||
|   ); |   ); | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 David Luzar
					David Luzar