Our brain thinks of animations imperatively. For example, to show a container (div), we want to expand the container from zero size to its full dimensions. And when we hide the container, we want to collapse the container from its full dimensions to zero size. The way we describe animations is imperative. How do we translate this to declarative way of writing code in React?…
Month: January 2018
React navigation is the suggested community package for navigation in React native apps. It has three navigators: Stack navigator, Tab navigator and Drawer navigator. There are quite a few configuration options. Overall, I find it quite useful for my needs. But, there is one area that requires a bit of work. It is about sharing data between the navigation buttons and the main app view.…
Async / await in JavaScript makes async programming look synchronous. The code for importing a row of data using async / await pattern looks like below.
async function validateAndImportRow(row) { const isValid = await validateRow(row); if (isValid) { await import(row); } return isValid; }
I am a late adopter of almost everything. For example, it was not until 2003 when I got my first mobile phone.…
Styled components is the new rage in the world of React. It allows to define components with accompanying style like below.
const Button = styled.a` display: inline-block; border-radius: 3px; padding: 0.5rem 0; margin: 0.5rem 1rem; width: 11rem; background: transparent; color: white; border: 2px solid white; `
The above code defines a Button component which is styled based on a link element.…
For the last 18 months, I am working from home as a professional freelancer. I have put together a mini-guide on how to become a professional freelancer in 7 steps.
Step 1: Choose a technology
Not all technologies are suitable for freelance positions. Java, C, and C# have a huge following. But most enterprises which use these programming languages prefer to do it onsite.…