Just a personnal sandbox to experiment react and it's environment (webpack, babel)
- Setup a React Environment Using webpack and Babel
- Setting up webpack, Babel and React from scratch
- Github repo with React, webpack and Babel
- CSS in JS projects list
- Webpack — The Confusing Parts
- Flux vs Redux
- You Might Not Need Redux
- Why We Should Stop Using Bower – And How to Do It
React
: to write and include web componentWebpack
: to compile every components togetherBabel
: to process ES6 to browser-compatible JavascriptAphrodite
: simplify style writing, and needed if you want pseudo class & media-queries- I should not export aphrodite linked css, should be vanilla
- I manage images (
src
,background-image
) normally, without usingwebpack
libraries likefile-loader
orurl-loader
npm start
: this command will startwebpack-dev-server
Just some thoughts, not fixed :
- components
-- App
--- App.tpl.js // Export only html (or JSX ?) template
--- App.styles.js // Export Aphrodite style (cf. https://github.com/Khan/aphrodite)
--- App.ctrl.js // Export logic (controller ?)
--- App.react.js // React component assembling everything together
--- App.wcomp.js? // Web component assembling everything together (cf. http://w3c.github.io/webcomponents/spec/custom)
- Render the
App
inside#app
- Component style
- Create a stylesheet with
Aphrodite
- Create a stylesheet with
- Global style
- Create a stylesheet for
App
- Does the stylesheet support deep declarations (
.input-group input
for example) ? - No, and you should avoid thinking style this way, if it's truly necessary, make a basic css stylesheet and import it in
App
- Does the stylesheet support deep declarations (
- Create a stylesheet for
- Implement
bootstrap
andfont-awesome
- With appropriates loaders (
style-loader
andcss-loader
for CSS, andurl-loader
for fonts)
- With appropriates loaders (
- How to implement
bower_components
or simply front packages ?- There is no more distinction between front and back packages, so :
- Con, it could be hard for some libs, and painful to maintain complex libs (which file should I include ?)
- Just don't use
Bower
anymore, usenpm
instead and simply import dependencies into yourjs
project
- Resolve src
js
files withWebpack resolve.modulesbabel-plugin-root-import
- Use
normalize.css
- Export template to detached file
- Is it a good practice or not ?
- Improve webpack configs (dev, prod)
- Client and Server side rendering
- Sort dev/non-dev npm dependencies
- Look for naming good practices
- Create smart components (with controller)
- Webpack Hot Module Replacement (HMR)
- Data flow & concepts (see Flux and Redux)
- Full compatibility with :
web-component
concept,Polymer Project
andReact
(alsoInferno
andPreact
)