fix(#762): ensure react is mounted in Jquery3 #867
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Remove explicit JQuery hooks and use the browser's implementation
Other Information
It was quite hard to replicate because in a standard rails install, Turbolink will be preferred, and once removed it just so happens that JQuery + (Rails/JQuery)_UJS is loaded in the correct order so you really have to get quite unlucky to trigger the bug at #762
I'll likely release the NPM package (react_UJS) as a pre-release first, to make sure it actually plays nicely with more complex JQuery setups.
I don't have a complex example app to test it on therefore I will be relying on community input before merging.
Edit: Also Travis is being painful today, failed 3 times at random, passed 2nd or 3rd run, got a segfault, a Yarn timeout, and a GPG Key mismatch.