What I learned making my first open source React component

  • A folder for your code, a folder for your demo app (plus dev server and hot loading, yay\o/), a folder that you should use and I didn’t, some build stuff for shipping… – – Basically, it gives you everything you need so you can focus on your component and don’t…
  • You need a demo page so you can show off your component in action.
  • react-lazyload-fadein, for example, has a demo page that shows off different ways you can use it.
  • People will find out about your component in different ways.
  • Especially if someone could figure out how to slurp in the README file and make that demo page for you 🤔 – – The React community is a bit silly and loves to invent new patterns to bicker about.

Continue reading “What I learned making my first open source React component”

Webpack — The Confusing Parts — Medium

Figure out the confusing parts of Webpack:  #ReactJS

  • For example the below config will generate 3 files: vendor.js that contains three vendor files, an index.js and a profile.js.
  • The name of the file comes from the “entry” object’s keys.
  • Further loaders also allow importing such files into JS via “require” or “import” in ES6.
  • OPTION 1: //Install it globally npm install webpack-dev-server –save //Use it at the terminal $ webpack-dev-server –inline –hot OPTION 2: // Add it to package.json’s script
  • A sample dev v/s prod Webpack files Typically most projects use so many features that they usually have two large Webpack config files.

Read the full article, click here.

@ReactiveConf: “Figure out the confusing parts of Webpack: #ReactJS”

Webpack is the leading module bundler for React and Redux apps. I think folks using Angular 2 and other frameworks are also using it a lot…

Webpack — The Confusing Parts — Medium