File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/react-native-web/src/exports/Image Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ describe('components/Image', () => {
257
257
expect ( onLoadEndStub . mock . calls . length ) . toBe ( 1 ) ;
258
258
} ) ;
259
259
260
- // This test verifies that wen source is declared in-line and the parent component
260
+ // This test verifies that when source is declared in-line and the parent component
261
261
// re-renders we aren't restarting the load process because the source is structurally equal
262
262
test ( 'is not called on update when "headers" and "uri" are not modified' , ( ) => {
263
263
const onLoadStartStub = jest . fn ( ) ;
@@ -451,7 +451,7 @@ describe('components/Image', () => {
451
451
) ;
452
452
} ) ;
453
453
454
- // A common case is `source` declared as an inline object, which cause is to be a
454
+ // A common case is `source` declared as an inline object, which creates a
455
455
// new object (with the same content) each time parent component renders
456
456
test ( 'it still loads the image if source object is changed' , ( ) => {
457
457
ImageLoader . load . mockImplementation ( ( ) => { } ) ;
Original file line number Diff line number Diff line change @@ -382,7 +382,7 @@ const useSource = (
382
382
} , [ source ] ) ;
383
383
384
384
// Always use the latest value of any callback passed
385
- // Keeping a ref we avoid (re)triggering the load effect just because a callback changed
385
+ // By keeping a ref, we avoid (re)triggering the load effect just because a callback changed
386
386
// (E.g. we don't want to trigger a new load because the `onLoad` prop changed)
387
387
const callbackRefs = React . useRef ( callbacks ) ;
388
388
callbackRefs . current = callbacks ;
@@ -425,7 +425,7 @@ const useSource = (
425
425
setStatus ( LOADING ) ;
426
426
const requestId = ImageLoader . load ( resolvedSource , handleLoad , handleError ) ;
427
427
428
- // Release resources on umount or after starting a new request
428
+ // Release resources on unmount or after starting a new request
429
429
return ( ) => ImageLoader . release ( requestId ) ;
430
430
} , [ resolvedSource ] ) ;
431
431
You can’t perform that action at this time.
0 commit comments