All Projects โ†’ darul75 โ†’ Web React

darul75 / Web React

๐Ÿ’  Another React Dev Kit with Webpack and NodeJS

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Web React

Mern
๐ŸŽ‰ This is boilerplate for MERN stack with integrations like Redux and SSR ๐ŸŽ‰
Stars: โœญ 77 (-6.1%)
Mutual labels:  webpack
Webpack React
๐Ÿ‘๐Ÿ‘reactๅ…ฅ้—จ๏ผŒๆŠ›็ –ๅผ•็Ž‰
Stars: โœญ 79 (-3.66%)
Mutual labels:  webpack
Semaphore Ng2 Webpack
Stars: โœญ 81 (-1.22%)
Mutual labels:  webpack
Angular2 Demo
A simple demo for Angular 2
Stars: โœญ 77 (-6.1%)
Mutual labels:  webpack
Vue Md Loader
โœจ Markdown files to ALIVE Vue components.
Stars: โœญ 78 (-4.88%)
Mutual labels:  webpack
Jhipster5 Demo
Get Started with JHipster 5 Tutorial and Example
Stars: โœญ 80 (-2.44%)
Mutual labels:  webpack
Template.js
A javascript template engine, simple, easy & extras, support webpack, rollup, parcel, browserify, fis and gulp
Stars: โœญ 1,201 (+1364.63%)
Mutual labels:  webpack
React Webpack Babel
Simple React Webpack Babel Starter Kit
Stars: โœญ 1,241 (+1413.41%)
Mutual labels:  webpack
Vue Ssr
ๅŸบไบŽvue-ssrๆญๅปบ็š„ไธ€ๅฅ—nodeๆœๅŠก็ซฏๆธฒๆŸ“ๅทฅไฝœๆต
Stars: โœญ 78 (-4.88%)
Mutual labels:  webpack
Multi Page App With React
๐Ÿ”ง A lightweight, flexible webpack setup with React for multi page application development
Stars: โœญ 82 (+0%)
Mutual labels:  webpack
Vue H5 Pro
๐Ÿš€ ๅŸบไบŽ@vue/CLI3ๆž„ๅปบ็š„็งปๅŠจ็ซฏh5้กน็›ฎๆจกๆฟ
Stars: โœญ 78 (-4.88%)
Mutual labels:  webpack
Aspnetcoredemoapp
ASP.NET Core demo app with webpack bundle
Stars: โœญ 78 (-4.88%)
Mutual labels:  webpack
React Router Animation Examples
An example using React Router and React's Animations
Stars: โœญ 80 (-2.44%)
Mutual labels:  webpack
Mina Webpack
๐Ÿฑ Mina single-file-component meets Webpack
Stars: โœญ 77 (-6.1%)
Mutual labels:  webpack
Spa Starter Kit
๐Ÿ“ฆ Quick starter kit for booting up a NodeJS container with React, webpack, babel/ES2015, Redux, and more.
Stars: โœญ 81 (-1.22%)
Mutual labels:  webpack
Polled.win
๐Ÿ“Š Real time polling
Stars: โœญ 76 (-7.32%)
Mutual labels:  webpack
Alias Hq
The end-to-end solution for configuring, refactoring, maintaining and using path aliases
Stars: โœญ 77 (-6.1%)
Mutual labels:  webpack
Hactar
The solution to JavaScript Fatigue. Zero config dev
Stars: โœญ 82 (+0%)
Mutual labels:  webpack
Easy Pack
Webpack, Ahhhhhhh .... Take Easy
Stars: โœญ 82 (+0%)
Mutual labels:  webpack
Page Builder
่‡ชๅฎšไน‰้กต้ขๆž„ๅปบๅนณๅฐ
Stars: โœญ 81 (-1.22%)
Mutual labels:  webpack

web-react NPM version Build Status Join the chat at https://gitter.im/darul75/web-react

Another Webpack React Kit.

Why

Because there are many React starter kits but some are so specific and difficult to take in hands.

Idea was to take in hands following stack :

  • ES6 : and you will learn React with awesome ECM6 features.
  • Webpack : amazing bundler, still to learn so much about it.
  • React : choosed because I love idea of Virtual DOM.
  • Flux : flux and used implementation is Alt
  • Immutable : Immutable everywhere.
  • EsLint: JS and JSX syntax validator.
  • Express: Version 4.
  • Mocha: Testing.

For a simple website with no server side it is really fine.

For a more complex website, an Express server is used but work is not finished.

  • Server side React rendering is ready and done through React-Router
  • Flux on server side has begin thanks to Iso and Alt feature to bootstrap your app with data.
  • Some API server routes are just given as example.
  • You can debug it on server side thanks to sourcemaps.
  • NEW FEATURE : hot reloading of you code on server side too (node), it will patch silently without restarting your node server.

On both client/server Fetch request handler is used (for example on server side)

Hope you will enjoy.

CODE, DEBUG in an isomorphic JS way !

Demo

https://react-web.herokuapp.com/

Try reload page, put wrong path, snapshot todo list...play, I will improve it later to show how it works.

How to use it

DEV ONLY CLIENT

Webpack with hot changes loading but no own server, enough for a single presentation page app by instance. Port: 8080

See changes at http://127.0.0.1:8080

npm run dev

DEV ONLY CLIENT/SERVER

Let's use your own NodeJS server.

Start webpack in background with hot changes loading and debug in both client/server sides.

npm run dev-server-client

THEN when bundle is generated in build folder, start your node server (express), launched in ES6 thanks to Babel.

npm run dev-server

or with debug nodejs mode :

node-inspector &
npm run dev-server-debug

Go to inspector (because of break mode) http://localhost:8080/?ws=localhost:8080&port=5858

See changes at http://127.0.0.1:3000

PRODUCTION

Build production bundle both client and server.

npm run build

Run production client/server React/Express website.

npm run start

See it at http://127.0.0.1:3000

STRUCTURE

.
โ”œโ”€โ”€ /build/                     # Compiled output
โ”œโ”€โ”€ /conf/                      # Webpack scripts + testing glue.
โ”œโ”€โ”€ /dist/                      # Production compiled output
โ”œโ”€โ”€ /node_modules/              # 3rd-party libraries and utilities
โ”œโ”€โ”€ /app/                       # Source code of the client application
โ”‚   โ”œโ”€โ”€ /actions/               # Action creators that allow to trigger a dispatch to stores
โ”‚   โ”œโ”€โ”€ /components/            # React components
|       |โ”€โ”€ /__tests__/         # React components unit tests
โ”‚   โ”œโ”€โ”€ /stores/                # Stores contain the application state and logic
โ”œโ”€โ”€ /server/                    # The source code of the server application
โ”‚   โ”œโ”€โ”€ /api/                   # REST API
โ”‚   โ”œโ”€โ”€ /routes/                # Express routes entries
โ”‚   โ”œโ”€โ”€ /server/                # Server-side startup script
โ”‚   โ”œโ”€โ”€ /utils/                 # Some specific, rendering...
โ”œโ”€โ”€ /assets/                    # Static resources
โ”‚   โ”œโ”€โ”€ index.html              # Html templates used for `dev client` / `dev server` / `production`
โ”‚   โ”œโ”€โ”€ config                  # JSON configuration file, used for <head> metas today, more later...
โ””โ”€โ”€ package.json                # The list of 3rd party libraries and utilities

FOCUS

Thanks to react-helmet, now you will be able to enhance head dom part with one json configuration file.

{
  "title": "web-react",
  "meta":[
    {
      "name": "description",
      "content": "Webpack Node React Starter Kit"
    },
    {
      "name": "viewport",
      "content": "width=device-width, initial-scale=1"
    }
  ],
  "link": [
    {
      "rel": "shortcut icon",
      "href": "/favicon.ico",
      "type": "image/x-icon"
    },
    {
      "rel": "icon",
      "href": "/favicon.ico",
      "type": "image/x-icon"
    }
  ]
}

RELEASE

  • 1.2.0: see CHANGELOG.md file
  • 1.1.0: react 0.14.0 + react-router 1.0.x => refactoring
  • 1.0.9: bump RHL version, may remove NoErrorsPlugin with React Hot Loader 1.3.0
  • 1.0.8: record/reload all dispatched payload example
  • 1.0.7: Immutable integration + code refactoring + todo task edition + some actions
  • 1.0.6: branding
  • 1.0.5: fix runtime dependency
  • 1.0.4:
  • tags in config file, meta, links + dynamic title ability, isomorphic
  • 1.0.3: fix import + dependent store example
  • 1.0.2: webpack hot module store fixture
  • 1.0.1: connect stores wrapper + refactoring
  • 1.0.0: footer + demo tags
  • 0.0.9: demo production distribution + local webpack path + licence
  • 0.0.8: hot HMR server reloading + refactor server directories.
  • 0.0.7: testing available with mocha, scss/sass/css loaders fixes.
  • 0.0.6: full ES6 + start refactoring.
  • 0.0.5: debug mode for both client/server side
  • 0.0.4: starter kit

Metrics

NPM

TODO

  • [x] Update React/React routet version and other libraries if needed
  • [ ] Look at webpack node middleware for HMR
  • [ ] Now that io.js and node merged again, see for ES6/ES7 compliance and refactoring
  • [ ] More example of routing, fetching.
  • [ ] More tests
  • [ ] Change flux implementation => redux ?

License

The MIT License (MIT)

Copyright (c) 2015 Julien Valรฉry

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].