{"id":16293569,"url":"https://github.com/badsyntax/react-twitter","last_synced_at":"2025-04-09T11:13:35.816Z","repository":{"id":27633994,"uuid":"31118538","full_name":"badsyntax/react-twitter","owner":"badsyntax","description":"An example twitter stream built with react, es6, browserify and other shiny tools","archived":false,"fork":false,"pushed_at":"2015-02-22T09:51:24.000Z","size":128,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-15T05:15:01.282Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/badsyntax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-21T07:28:16.000Z","updated_at":"2015-05-02T23:53:59.000Z","dependencies_parsed_at":"2022-09-02T22:52:21.395Z","dependency_job_id":null,"html_url":"https://github.com/badsyntax/react-twitter","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/badsyntax%2Freact-twitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badsyntax%2Freact-twitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badsyntax%2Freact-twitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badsyntax%2Freact-twitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badsyntax","download_url":"https://codeload.github.com/badsyntax/react-twitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248027412,"owners_count":21035594,"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-10T20:11:45.324Z","updated_at":"2025-04-09T11:13:35.799Z","avatar_url":"https://github.com/badsyntax.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Boilerplate for react with ES6 and browserify\n\nThis is a boilerplate repo for using react with ES6 and browserify, and running it with gulp.\n\nIt also supports Sass compilation.\n\n## Installation\n\n```\nnpm install\n```\n\nAfter the installation, run `gulp` and browse to _http://localhost:8888_\n\nThe compiled code can be found in dist/bundle/app.js.\n\n## What do you get\n\n* A gulpfile with livereload\n* Compilation of the jsx [1]\n* Compilation of ES6 to ES5 [2], [3]\n\n## React with ES6\n\n### ES6 classes\n\n```js\nimport React from 'react'; // import react\n\nclass _MainSection {\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003ch1\u003eExample of React with es6 and browserify\u003c/h1\u003e\n        \u003cBody /\u003e\n      \u003c/div\u003e\n    );\n  }\n}\nexport const MainSection = React.createClass(_MainSection.prototype);\n```\n\nWe can create ES6 classes, but have to export it with `React.createClass` [5]. Importing the created files can be done like this:\n\n```js\nimport {MainSection} from './components/MainSection.react.jsx';\n```\n\n### String templating for classes\n\n```js\nclass _Body {\n  getClassName() {\n    return 'foo';\n  }\n\n  render() {\n    const x = 'x';\n\n    return (\n      \u003cdiv className={`${x} ${this.getClassName()} bar`}\u003e\n        Hello there!\n      \u003c/div\u003e\n    );\n  }\n}\n```\n\nAs you can see, you can use template literals [6] to create your classnames.\n\n## Sources\n\n* [0] Browserify - https://github.com/substack/node-browserify\n* [1] Reactify - https://github.com/andreypopp/reactify\n* [2] es6ify - https://github.com/thlorenz/es6ify\n* [3] traceur-compiler - https://github.com/google/traceur-compiler\n* [4] vinyl-source-stream - https://www.npmjs.org/package/vinyl-source-stream\n* [5] react-es6-class - https://github.com/bjoerge/react-es6-class\n* [6] Template Literals - https://github.com/google/traceur-compiler/wiki/LanguageFeatures#template-literals\n* [7] Fast build with browserify and reactjs - http://blog.avisi.nl/2014/04/25/how-to-keep-a-fast-build-with-browserify-and-reactjs/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadsyntax%2Freact-twitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadsyntax%2Freact-twitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadsyntax%2Freact-twitter/lists"}