{"id":21890810,"url":"https://github.com/chantastic/react-rails-alt","last_synced_at":"2025-07-05T09:36:14.152Z","repository":{"id":31378650,"uuid":"34941684","full_name":"chantastic/react-rails-alt","owner":"chantastic","description":"A sample Rails application with React.js and Alt(Flux)","archived":false,"fork":false,"pushed_at":"2015-10-29T01:49:01.000Z","size":176,"stargazers_count":22,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T13:46:52.734Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chantastic.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-02T09:06:06.000Z","updated_at":"2020-09-05T22:30:12.000Z","dependencies_parsed_at":"2022-08-17T18:55:14.734Z","dependency_job_id":null,"html_url":"https://github.com/chantastic/react-rails-alt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chantastic/react-rails-alt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chantastic%2Freact-rails-alt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chantastic%2Freact-rails-alt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chantastic%2Freact-rails-alt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chantastic%2Freact-rails-alt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chantastic","download_url":"https://codeload.github.com/chantastic/react-rails-alt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chantastic%2Freact-rails-alt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263719765,"owners_count":23501105,"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":[],"created_at":"2024-11-28T12:17:14.341Z","updated_at":"2025-07-05T09:36:14.122Z","avatar_url":"https://github.com/chantastic.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## react-rails-alt\n\n**DEMO APP**\n\nThis is demonstrates an app working with Rails, [React.js](http://reactjs.org),\nand [Alt](http://alt.js.org).\n\n## Dependencies\n\n* [react-rails gem](https://github.com/reactjs/react-rails) \u0026mdash; for\n  React.js, ES6 Harmony, and `react_component` mounting helper.\n* [rails-assets](https://rails-assets.org/) \u0026mdash; for access to the\n  [bower](http://bower.io/) version of Alt.\n\n## Implementation\n\n### ES6 Harmony\n\nES6 Harmony support must be enabled: https://github.com/reactjs/react-rails#jsx\n\nSome notable ES2015 features are missing, like `const` and `let`.\n\n**NOTE: if you config after the Asset Pipeline has its way with your\ncomponents, you'll need to run `bin/rake assets:clean` or `rm -vfr tmp/cache` to\nget things working again.**\n\n### Alt instantiation\n\nMake sure to instantiate alt before loading stores, actions, etc.\n\nI did this with the following in `application.js`:\n\n```js\n...\n//= require_self\n//= require_tree .\n\nvar alt = new Alt();\n```\n\n### Alt and avoiding Modules\n\nIf you want to avoid adding a module system, you'll need to wrap Alt examples in\nan IIFE. If the Alt docs read something like this:\n\n```javascript\nclass NameActions = { ... }\n\nmodule.exports = alt.createActions(NameActions);\n```\n\nYou'll write something like this:\n\n```javascript\n(() =\u003e {\n  class NameActions { ... }\n\n  this.NameActions = alt.createActions(NameActions);\n})();\n```\n\n**NOTE: if you want ES6 syntax available in these files, you'll need to append\n`.jsx` to the file name. This is a little kludgy but will allow you to work with\nthe gems you already have installed.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchantastic%2Freact-rails-alt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchantastic%2Freact-rails-alt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchantastic%2Freact-rails-alt/lists"}