{"id":15112166,"url":"https://github.com/aranab/codearx-react","last_synced_at":"2025-09-27T14:31:48.063Z","repository":{"id":33566823,"uuid":"149432824","full_name":"aranab/codearx-react","owner":"aranab","description":"A project of react developing template","archived":true,"fork":false,"pushed_at":"2022-05-18T12:13:25.000Z","size":2043,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-27T00:42:09.534Z","etag":null,"topics":["babel","es6","gruntjs","libsass","node-sass","nodejs","reactjs","sass","susy","webpack4"],"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/aranab.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":"2018-09-19T10:22:53.000Z","updated_at":"2023-01-28T00:41:53.000Z","dependencies_parsed_at":"2022-09-12T22:12:19.032Z","dependency_job_id":null,"html_url":"https://github.com/aranab/codearx-react","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/aranab%2Fcodearx-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aranab%2Fcodearx-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aranab%2Fcodearx-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aranab%2Fcodearx-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aranab","download_url":"https://codeload.github.com/aranab/codearx-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234444009,"owners_count":18833643,"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":["babel","es6","gruntjs","libsass","node-sass","nodejs","reactjs","sass","susy","webpack4"],"created_at":"2024-09-26T00:42:18.931Z","updated_at":"2025-09-27T14:31:42.771Z","avatar_url":"https://github.com/aranab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Resource Overview\nA project of react developing template\n 1. Javascript(ES6 or ECMAScript 6 or ECMAScript 2015, ES2016, ES2017 syntax)\n 2. [Nodejs](https://nodejs.org/en/) and [npm](https://www.npmjs.com/)\n 3. [Reactjs](https://reactjs.org/)\n 4. [babel 7.x](https://babeljs.io/)\n 5. [Webpack and webpack module loaders](https://webpack.js.org/)\n 6. [Sass](https://sass-lang.com/)\n\n - To generate distribution(dist) folder: Run `\u003e npm run build`\n - To start project in webserver: Run `\u003e npm start`\n\n### What is React?\n - A library for user interfaces\n - Create at Facebook and Instagram\n - React Native for mobile\n - [React Website](https://reactjs.org/)\n - [github repo](https://github.com/facebook/react/)\n - Virtual DOM\n  \n### Efficient rendering with React:\n - DOM Diffing\n   - Compares rendered content with the new UI changes\n   - Makes only the minimal changes necessary\n   - Compares JavaScript objects\n   - Is faster than writing to or reading from DOM\n\n### Pure React:\n - [`React.createElement(type, [props], [...children])`](https://reactjs.org/docs/react-api.html#creating-react-elements)\n - [`ReactDOM.render(element, container[, callback])`](https://reactjs.org/docs/react-dom.html#render)\n - [httpster webserver](https://www.npmjs.com/package/httpster)\n\n### Refactoring elements using JSX:\n - JSX: JavaScript XML and its a tag base syntax.  \n - [JSX is use to create React elements](https://reactjs.org/docs/introducing-jsx.html)\n - JSX expression wrap by carly braces `{}`\n - JSX code is transpiled by babel.\n\n### Install react:\n - [react](https://www.npmjs.com/package/react): Run `\u003e npm install react`\n - [react-dom](https://www.npmjs.com/package/react-dom): Run `\u003e npm install react-dom`\n\n### Babel inline transpiling:\n - [Babel is a JavaScript compiler](https://babeljs.io/docs/en/), which is transpiling \n   unsupported javascript and make the js code browser compatible.\n - [ECMAScript 6/es6, also known as ECMAScript 2015](https://github.com/lukehoban/es6features#readme)\n - [es2016, es2017](https://medium.freecodecamp.org/here-are-examples-of-everything-new-in-ecmascript-2016-2017-and-2018-d52fa3b5a70e)\n - [babel in the browser](https://babeljs.io/setup#installation)\n\n## Babel static transpiling with babel-cli 7.x:\n - [Babel cli and core](https://babeljs.io/docs/en/babel-cli): Run `\u003e npm install --save-dev @babel/core @babel/cli`\n - Create [`.babelrc`](https://babeljs.io/docs/en/config-files/) configuration file \n   where all of [preset](https://babeljs.io/docs/en/presets) and\n   [plugins](https://babeljs.io/docs/en/plugins/) are enabled\n - Presets\n   - [@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env): Run `\u003e npm install --save-dev @babel/preset-env`\n   - [@babel/preset-react](https://babeljs.io/docs/en/babel-preset-react): Run `\u003e npm install --save-dev @babel/preset-react`\n - Output file generate command `npm run babel [source file path] --out-file [destination file path]`: \n   Run `\u003e ./node_modules/.bin/babel ./src/index.js --out-file ./dist/bundle.js`\n\n## Building with webpack:\n - Is a module bundler\n - Creates static files\n - Automates processes\n - Used current version [Webpack 4.x](https://github.com/webpack/webpack/releases/tag/v4.19.1) and [webpack-cli](https://github.com/webpack/webpack-cli): \n   Run `\u003e npm install --save-dev webpack webpack-cli`\n - [webpack configuration sample](https://webpack.js.org/configuration/#options)\n - [webpack-dev-server](https://github.com/webpack/webpack-dev-server/): Run `\u003e npm install --save-dev webpack-dev-server`\n - Loaders:\n   - [babel-loader](https://webpack.js.org/loaders/babel-loader/): Run `\u003e npm install --save-dev babel-loader`\n   - [html-loader](https://webpack.js.org/loaders/html-loader/): Run `\u003e npm install --save-dev html-loader`\n   - [style-loader](https://webpack.js.org/loaders/style-loader/): Run `\u003e npm install --save-dev style-loader`\n   - [css-loader](https://webpack.js.org/loaders/css-loader/): Run `\u003e npm install --save-dev css-loader`\n   - [postcss-loader](https://webpack.js.org/loaders/postcss-loader/): Run `\u003e npm install --save-dev postcss-loader`\n   - [sass-loader](https://webpack.js.org/loaders/sass-loader/) and [node-sass](https://www.npmjs.com/package/node-sass): \n     Run `\u003e npm install --save-dev sass-loader node-sass`\n   - [image loading and optimizing ](https://webpack.js.org/guides/asset-management/#loading-images)\n   - [font loading](https://webpack.js.org/guides/asset-management/#loading-fonts)\n - Plugins: \n    - [Generate index.html](https://webpack.js.org/plugins/html-webpack-plugin/): Run `\u003e npm install --save-dev html-webpack-plugin`\n    - [Write to disk the html file](https://github.com/jantimon/html-webpack-harddisk-plugin): Run `\u003e npm install --save-dev html-webpack-harddisk-plugin`\n    - [Clean output files](https://www.npmjs.com/package/clean-webpack-plugin): Run `\u003e npm install --save-dev clean-webpack-plugin`\n    - [Extracts CSS into separate files](https://webpack.js.org/plugins/mini-css-extract-plugin/): Run `\u003e npm install --save-dev mini-css-extract-plugin`\n    - [JS minimizer](https://github.com/webpack-contrib/terser-webpack-plugin): Run `\u003e npm install --save-dev terser-webpack-plugin`\n    - [CSS minimizer](https://github.com/NMFR/optimize-css-assets-webpack-plugin): Run `\u003e npm install --save-dev optimize-css-assets-webpack-plugin` \n - Build command: Run `\u003e npm run build`\n - Start webserver: Run `\u003e npm start`\n\n# React App:\n\n### Create components:\n - Create a [React Component](https://reactjs.org/docs/react-without-es6.html) by extending [`React.Component`](https://reactjs.org/docs/react-component.html) rather than using `React.createClass` since its deprecated from version `16.0` onwards and has been moved to a separate package ['create-react-class'](https://www.npmjs.com/package/create-react-class).\n - [Adding Props to components](https://reactjs.org/docs/components-and-props.html). Props of React is being an object and every props is a key.\n - Class has additional features such as [local state](https://reactjs.org/docs/state-and-lifecycle.html#adding-local-state-to-a-class) and [lifecycle methods](https://reactjs.org/docs/state-and-lifecycle.html#adding-lifecycle-methods-to-a-class).\n - [Stateless functional components](https://reactjs.org/docs/hooks-state.html#hooks-and-function-components)\n - Added react-icons: Run `\u003e npm install --save react-icons`\n - [Composition vs Inheritance](https://reactjs.org/docs/composition-vs-inheritance.html)\n - [The Component Lifecycle](https://reactjs.org/docs/react-component.html#the-component-lifecycle)\n - [Random Users Demo Data](https://randomuser.me/)\n - [isomorphic-fetch is used for fetching data from API](https://www.npmjs.com/package/isomorphic-fetch): Run `\u003e npm install --save isomorphic-fetch es6-promise`\n\n### Props:\n - Provide props default value.\n - [Validating or typechecking with PropTypes](https://reactjs.org/docs/typechecking-with-proptypes.html)\n - [ProTypes](https://www.npmjs.com/package/prop-types): Run `\u003e npm install --save prop-types`\n\n### State:\n - [State and Lifecycle](https://reactjs.org/docs/state-and-lifecycle.html)\n\n### React Router:\n - [Declarative routing for React](https://github.com/ReactTraining/react-router)\n - [react-router](https://www.npmjs.com/package/react-router): Run `\u003e npm install --save react-router`\n - [DOM bindings for React Router](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-dom): Run `\u003e npm install --save react-router-dom`\n - [React Native bindings for React Router](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-native): Run `\u003e npm install --save react-router-native`\n\n### Form Component:\n - In most cases, React team recommend using [controlled components](https://reactjs.org/docs/forms.html#controlled-components) to implement forms. In a controlled component, form data is handled by a React component. The alternative is [uncontrolled components](https://reactjs.org/docs/uncontrolled-components.html), where form data is handled by the DOM itself.\n - [Legacy API: String Refs](https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs) is deprecated.\n - Using [refs](https://reactjs.org/docs/glossary.html#refs) in class components.\n - [Refs and the DOM](https://reactjs.org/docs/refs-and-the-dom.html)\n - [Forwarding Refs](https://reactjs.org/docs/forwarding-refs.html)\n - Two-way function binding by using Refs.\n - [All Supported HTML Attributes](https://reactjs.org/docs/dom-elements.html)\n - Adding a autocomplete component for dropdownlist.\n\n### Useful Links:\n - State management by [Redux](https://github.com/reduxjs/redux)\n - Data management solution by [Relay](https://facebook.github.io/relay/)\n - Data management solution by [Falcor](https://netflix.github.io/falcor/)\n - Data management solution by [GraphQL](https://graphql.org/)\n\n## License\n Single license MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faranab%2Fcodearx-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faranab%2Fcodearx-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faranab%2Fcodearx-react/lists"}