React – Prevent Render when Props and State change

When we change the state or props of the component, render method is called by default. In order to prevent this behavior, we can use shouldComponentUpdate method. If we return false from this method, render is not called. This method receives props and state as parameter so we can check if certain state or props …

Bignumber issue in web3 invalid number value

Getting invalid number error when calling a method of a contract which take uint256 argument. Example:myContract.methods.transfer(accounts[1], 1e16).send({ from: accounts[0] }) When sending value 1e16 it throw errorweb3 invalid number value (arg=”_value”, coderType=”uint256″, value=10000000000000000) When sending value 10000000000000000 throw same error When sending value 1e16 as hex it work okay. No error. When sending value 1e15 …

JSON Formatter Chrome Extension

Makes JSON easy to read. Open source chrome extension. FEATURES• JSON & JSONP• Syntax highlighting• Collapsible trees, with indent guides• Clickable URLs• Toggle between raw and parsed JSON• Works on any valid JSON page – URL doesn’t matter• Works on local files too (if you enable this in chrome://extensions)• You can inspect the JSON by …

react-rails, easy way to integrate react to ruby on rails

react-rails(react-ujs) is a convenient and easy way to use react.js on ruby on rails projects.Using this gem/npm combo, we can add react.js boiler plate structure and generate components easily. Running rails server with rails s, will compile react webpack as well.