Skip to content

Commit ac1de0b

Browse files
committed
When using turbolinks, unmount components just before loading the new page
1 parent b1be9ae commit ac1de0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/assets/javascripts/react_ujs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
}
4949
}
5050
handleEvent('page:change', mountReactComponents);
51-
handleEvent('page:before-change', unmountReactComponents);
51+
handleEvent('page:receive', unmountReactComponents);
5252
};
5353

5454
var handleNativeEvents = function() {

0 commit comments

Comments
 (0)