What is a HOC?

Higher Order Component (HOC) is a function which accepts a base component and returns a decorated component.

const hoc = BaseComponent => props => (
  <BaseComponent {...props} />
)

The component that the HOC returns is a stateless functional component. At its most basic form, the base component is rendered with all the supplied props. The props can be overridden by a variation of HOC which accepts an option or configuration.…

Read More

When I first worked with Meteor, I was very excited by its full-stack(ness). Meteor allowed remote data to be reactive. It bundled MongoDB and has something called optimistic updates. The framework updated the client immediately, then batched updates to the server and if something went wrong with the server, switch back to the server provided value. For any geeky programmer, this feature gave goose bumps.…

Read More

For a technology startup, selecting the technology stack is important. Startups operate under severe budget and time constraints. And they do not have the reputation to hire good developers. For large companies, it is easy to procure developers based on product requirements. But that is not the case with startups.

Technology stack possibilities

At a minimum, the startup might have a web application and mobile apps for iOS and Android.…

Read More

I am using react-infinite-calendar in one of my projects. I highly recommend it if you are looking to display a calendar, especially a calendar with event dates highlighted on it.

The calendar is well-coded and well-documented. It is also written for extensibility. The calendar does not have a highlight feature built-in. But, it can be easily built using recompose. I believe at some point of time, the highlighting feature will be part of the library.…

Read More

Animation can be done using the Layout Animation or Animated API. LayoutAnimation happens on the UI thread. It is usually used when a view is created or destroyed. Sometimes, it is also used when the view changes size. LayoutAnimation works only on two properties: opacity and size. Layout Animation is the preferred way to animate as it is high-performant.

Animated API

However, background color cannot be animated using Layout Animation.…

Read More