Conversion of camel case string into snake case and vice-versa
I know, I know this is basic but basic is very important and I believe we should always explore new ways to implement basics. Today I am going to talk about one way for this conversion. As always there are multiple ways to solve this but I am sharing what I implemented in one of…
Best Practices of React Component
Consider below while designing react component Don’t update state (setState) in render method. Use constructor wisely. If you wish to bind event handlers or methods or initialize state then only use constructor. Do not assign props to state unless you wish to fix the value of state for that component. Plan meticulously if you are…
SharePoint Add-in using Angular2
In my last post I explained how we can create an SharePoint Add-in using Angular2 (beta version). But now Angular2 has been officially released and there are significant changes, so I thought I should work and create the SharePoint Add-in using Angular2 (version 2.1.0). Setting up the project for creating SharePoint Add-In using Angular 2…
Internationalization in Angular2
We all know that internationalization is important when it comes to bigger apps, or just the ones that are simply used across countries. Angular itself comes with very poor i18n support, which is why the community has built their own solutions to extend the framework’s functionalities to their needs. However, there’s finally a first-class solution…
Cannot re-export name that is not defined in the module ‘promise.d.ts’
TypeScript seems to have caused problems on the first line of promise.d.ts complaining that Promise cannot be exported as it is not defined in this file: ERROR in [default] /path/to/project/node_modules/angular2/src/facade/promise.d.ts:1:9 Cannot re-export name that is not defined in the module. I solved this problem by adding following line of code at line number 1 in…