{"id":17133313,"url":"https://github.com/gilbox/elegant-react-og","last_synced_at":"2025-03-24T05:43:25.181Z","repository":{"id":34559205,"uuid":"38504642","full_name":"gilbox/elegant-react-og","owner":"gilbox","description":"The elegant-react repo frozen in time before I abandonded the component function. ","archived":false,"fork":false,"pushed_at":"2015-07-03T18:03:36.000Z","size":6260,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T11:30:43.609Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gilbox.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":"2015-07-03T17:54:54.000Z","updated_at":"2021-08-05T21:16:24.000Z","dependencies_parsed_at":"2022-07-15T17:30:31.549Z","dependency_job_id":null,"html_url":"https://github.com/gilbox/elegant-react-og","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbox%2Felegant-react-og","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbox%2Felegant-react-og/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbox%2Felegant-react-og/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbox%2Felegant-react-og/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gilbox","download_url":"https://codeload.github.com/gilbox/elegant-react-og/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245217791,"owners_count":20579297,"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-10-14T19:41:53.617Z","updated_at":"2025-03-24T05:43:25.160Z","avatar_url":"https://github.com/gilbox.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### NOTE: I created this repo for posterity. Use this repo to grok the articles linked below in the *about* section, then [go here to see the latest elegant-react.](https://github.com/gilbox/elegant-react)\n\n# elegant-react\n\nFunctional React Architecture based on [omniscient](http://omniscientjs.github.io/) and [browser.html](https://github.com/mozilla/browser.html/).\nComments/suggestions/PRs are all welcome.\nThis is still experimental. If you are interested in something like\nthis for a production application, consider using [omniscient](http://omniscientjs.github.io/) instead.\n\n\n## about\n\nSee [this Medium article](https://medium.com/@gilbox/an-elegant-functional-architecture-for-react-faa3fb42b75b) and [this one](https://medium.com/p/7acf5d0cf00e) as well\n\n## Installation\n\nInstall via npm (note: this will install the *new* elegant-react)\n\n    npm install elegant-react\n\n## Using in your project (functional style)\n\nRequire it:\n\n    var {component, subedit} = require('elegant-react');\n\nOr if you'd like to enable debug mode:\n\n    var {component, subedit} = require('elegant-react')({debug: true});\n\n## Using in your project (classical style)\n\nRequire it:\n\n    var {elegant, subedit} = require('elegant-react/classy');\n\nOr if you'd like to enable debug mode:\n\n    var {elegant, subedit} = require('elegant-react/classy')({debug: true});\n\n## react-native support\n\nSame as the previous two sections, except replace:\n\n- `require('elegant-react')` with `require('elegant-react/native')`\n- `require('elegant-react/classy')` with `require('elegant-react/classy/native')`\n\n## Using in codepen, jsbin, etc.\n\nAdd the script:\n\n    //rawgit.com/gilbox/elegant-react/master/build/global/elegant-react.js\n\nThis exposes the global object `ElegantReact`.\n\nNow grab the component function:\n\n    var component = ElegantReact.component;\n\nOr if you'd like to enable `debug` mode:\n\n    var component = ElegantReact({debug: true}).component;\n\n\n## dependencies\n\nYou might notice that elegant-react has no `dependencies` nor `peerDependencies`\nlisted in it's package.json file. This is so it can support both react and react-native\nfrom the same npm package.\n\n\n## Run the examples\n\nClone this repo, then:\n\n    npm install\n    npm run examples\n\n... and navigate to [http://localhost:8080/webpack-dev-server/](http://localhost:8080/webpack-dev-server/)\n\n\n## differences from omniscient\n\n- omniscient will perform deep comparisons on props of any type with `lodash.isequal`.\n- omniscient supports components as function without JSX\n- omniscient supports cursors\n- omniscient is battle-tested\n- omniscient is unit-tested\n- omniscient is ~18kb minified. elegant-react is \u003c3kb minified (or ~4kb for classical style).\n- omniscient doesn't have the same idiomatic approach found in the `elegant-react/classy` package ([see this article](https://medium.com/p/7acf5d0cf00e) for more info)\n\n## live examples\n\n- [Phone Input](http://gilbox.github.io/elegant-react-og/examples/phone-input/demo.html)\n- [Phone Input (using classes)](http://gilbox.github.io/elegant-react-og/examples/phone-input-classy/demo.html)\n- [Address Book](http://gilbox.github.io/elegant-react-og/examples/address-book/demo.html)\n- [Address Book w/streams](http://gilbox.github.io/elegant-react-og/examples/address-book-streams/demo.html)\n- [Address Book w/\"Store\" streams](http://gilbox.github.io/elegant-react-og/examples/address-book-store-streams/demo.html)\n- [Address Book w/\"Store\" streams (using classes)](http://gilbox.github.io/elegant-react-og/examples/address-book-store-streams-classy/demo.html)\n- [Scroll Spring Animation](http://gilbox.github.io/elegant-react-og/examples/scroll-spring-animation/demo.html)\n\n## credit\n\nThis project is essentially a simplified version of [omniscient](http://omniscientjs.github.io/)\nand promotes the functional approach of [browser.html](https://github.com/mozilla/browser.html/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgilbox%2Felegant-react-og","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgilbox%2Felegant-react-og","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgilbox%2Felegant-react-og/lists"}