{"id":14955854,"url":"https://github.com/tb/react-rails-ujs","last_synced_at":"2025-09-29T23:32:02.155Z","repository":{"id":57343011,"uuid":"72943390","full_name":"tb/react-rails-ujs","owner":"tb","description":"mounting components built with webpack (compatible with react-rails)","archived":false,"fork":true,"pushed_at":"2019-02-03T10:31:56.000Z","size":3452,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-13T17:10:29.465Z","etag":null,"topics":["rails","react","rubyonrails","webpack"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"reactjs/react-rails","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-05T17:49:40.000Z","updated_at":"2023-02-22T12:47:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tb/react-rails-ujs","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tb%2Freact-rails-ujs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tb%2Freact-rails-ujs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tb%2Freact-rails-ujs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tb%2Freact-rails-ujs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tb","download_url":"https://codeload.github.com/tb/react-rails-ujs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219557402,"owners_count":16506924,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rails","react","rubyonrails","webpack"],"created_at":"2024-09-24T13:11:54.460Z","updated_at":"2025-09-29T23:31:56.738Z","avatar_url":"https://github.com/tb.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-rails-ujs\n\n[![npm version](https://badge.fury.io/js/react-rails-ujs.svg)](http://badge.fury.io/js/react-rails-ujs)\n[![Downloads](http://img.shields.io/npm/dm/react-rails-ujs.svg)](https://npmjs.org/package/react-rails-ujs)\n\nThis npm package is replacement for [react-rails](https://github.com/reactjs/react-rails)\nwhen assets pipeline is completely disabled and replaced with webpack bundles.\n\nCreated by [React Developers @ Selleo](https://selleo.com/react-expert-developers-team)\n\n## Install\n\n    npm i --save react-rails-ujs\n\nAdd react_component helper\n\n    module ApplicationHelper\n      def react_component(name, props = {}, options = {}, \u0026block)\n        html_options = options.reverse_merge(data: {\n          react_class: name,\n          react_props: (props.is_a?(String) ? props : props.to_json)\n        })\n        content_tag(:div, '', html_options, \u0026block)\n      end\n    end\n\n## Usage\n\nRender components into rails views\n\n    \u003c%= react_component('Message', text: 'Hello react-rails-ujs') %\u003e\n\nMount webpack bundled components\n\n    import { mountComponents } from 'react-rails-ujs';\n    \n    import { Message } from './components/Message';\n    \n    mountComponents({\n      Message,\n    });\n\n## Usage with React Hot Reload\n\n    import React from 'react';\n    import { AppContainer } from 'react-hot-loader';\n    import { mountComponents } from 'react-rails-ujs';\n\n    import { Message } from './components/Message';\n\n    const render = (Component, props) =\u003e (\n      \u003cAppContainer\u003e\u003cComponent {...props}/\u003e\u003c/AppContainer\u003e\n    );\n\n    mountComponents({\n      Message,\n    }, module.hot ? { render } : {});\n\n## Usage with Redux\n\n    import React from 'react';\n    import { Provider } from 'react-redux'\n    import { mountComponents } from 'react-rails-ujs';\n\n    import createStore from './store/createStore';\n    import { Message } from './components/Message';\n\n    const store = createStore();\n\n    const render = (Component, props) =\u003e (\n      \u003cProvider store={store}\u003e\u003cComponent {...props}/\u003e\u003c/Provider\u003e\n    );\n\n    mountComponents({\n      Message,\n    }, { render });\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftb%2Freact-rails-ujs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftb%2Freact-rails-ujs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftb%2Freact-rails-ujs/lists"}