From a48581350bf1c6a2d40df2b21a2d109221e4378f Mon Sep 17 00:00:00 2001 From: Vladislav Shulyugin Date: Tue, 10 May 2016 15:05:42 +0300 Subject: [PATCH] Add a tip on how to trigger UJS mounting from js --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 66da8f63..af687b1d 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,11 @@ and `data-react-props`. If Turbolinks is present components are mounted on the `page:change` event, and unmounted on `page:before-unload`. __Turbolinks >= 2.4.0__ is recommended because it exposes better events. +In case of __Ajax calls__, the UJS mounting can be triggered manually by calling from javascript: +```javascript +ReactRailsUJS.mountComponents() +``` + The view helper's signature is: ```ruby