minimal-react-starter

授权协议 Readme
开发语言 JavaScript
所属分类 Web应用开发、 常用JavaScript包
软件类型 开源软件
地区 不详
投 递 者 危璞
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Minimal React Starter

A starter project with React, Babel, and Webpack.

This starter is as minimal as possible while still including Babel and Webpack.

Create Project

git clone git@github.com:ahfarmer/minimal-react-starter.git

Setup

npm install

Usage

  1. node server.js

  2. Open http://localhost:3000/.

Build it from Scratch

Starter projects can be difficult for beginners to use because of all the moving pieces. To help you understand this starter project, there is a 7-step walkthrough showing how to create it from scratch.

Why Minimal?

The primary purpose of this project is learning.

For learning, a minimal starter project is best. Too many dependencies can cause confusion for a beginner. The process of selecting and adding what you need to a minimal project can be a good way to learn.

Why not more Minimal?

Babel and Webpack are the two tools that I view as completely essential in a React project.

There are no other tools that I have used consistently in every single React project that I have built, no matter how large or how small.

Babel: Even if you are just writing a quick test, you will likely want to use JSX in your components rather than writing out React.createElement over and over.

Webpack: Webpack serves as both the web server and the JavaScript bundler. The only alternative to using a bundler would be to include a <script> tag for each of your .js files, and that gets messy very quickly, even in a simple project.

More Details

  • No CSS. For experiments or tests, put your styles in index.html in a <style> tag. For real projects, pick from these style tools.
  • No Flux. If you need it - try Redux or MobX!
  • Webpack is run with the express and webpack-dev-middleware.
  • The 'content base' is set to www. Any files in that directory will be served by express.

HMR

HMR is not supported in the master branch for simplicity. If you would like HMR support, you can see the changes that add HMR support or you can directly clone the HMR branch:

git clone -b hmr git@github.com:ahfarmer/minimal-react-starter.git
 相关资料
  • Minimal Hapi + React + Webpack + HMR Sandbox This starter kit connects a hapi.js server with webpack dev server with react hot module reloading all set up. Very basic production config is also in plac

  • minimal-react-webpack-babel-setup Read how to set it up yourself: React with Webpack Tutorial. Features React 16 Webpack 5 Babel 7 Hot Module Replacement DIY Add-Ons ESLint CSS Modules SVG Icons Fonts

  • miniMAL 是小于 1KB JavaScript 的 Lisp 实现,包括 JSON 源,宏,TCO,互操作和异常处理。 miniMAL 核心解释器以不到1024字节的 JavaScript(uglify / regpack)实现。在 python(1.4K作为pyz文件)和 ClojureScript(缩小后为1.8K)中也有 miniMAL 的实现。 miniMAL 的设计始于 mal(使

  • Minimal Mistakes 是一个灵活的两列 Jekyll 主题,非常适合构建个人网站、博客和投资组合。 特性: 捆绑为“theme gem”,以便于安装/升级。 与 GitHub 页面兼容。 支持 Jekyll 的内置 Sass/SCSS 预处理器。 九种不同的皮肤(颜色变化)。 几个响应式布局选项(单个、存档索引、搜索、启动和分页主页)。 针对搜索引擎进行了优化,支持Twitter Ca

  • �� preact-minimal Minimal preact structure. Preact is just soooooo fast! ⚡ ⚡ ⚡ But when you have an idea and want to start coding right away, then it becomes really hard and timeconsuming to setup and

  • The Minimal Light Theme [Demo the theme] [简体中文 | 繁體中文 | Deutsche] This is the source code of my homepage. I build this website based on minimal. Feel free to use and share the source code anywhere you