By default ES6 modules in create-react-app use relative paths. But using relative paths is a real pain when you start dealing with deeply nested tree structures because you end up with dot-dot syndrome. After digging through a bunch of github issues I was finally able to boil down the steps required to implement absolute imports …
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 …
Defs and clipPath in SVG
If you put clipPath into defs and use inkscape to convert svg to png, defs is removed automatically. Do you understand what I mean? If not send mail to novofox@outlook.com directly. This is very tricky experience and knowledge. If you work svg and inkscape, this knowledge will be very helpful. 😉
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 …
Use Mapbox in Angular
https://wykks.github.io/ngx-mapbox-gl/ This is so cool map box example in angular.
Lazy Loading for iFrame
When we work on the speed optimization of website, it’s important to figure out the iFrame loading issue as it require lots of requests and loading time. In order to fix it, we can apply the lazy loading effect to the iFrame. There are few helpers to implement the lazy loading for iFrame, but the …