Animations make your app visually more attractive. Animate the header in your React Native app

photo man showing lines of movement
photo man showing lines of movement
Movement is appealing (Photo by Ahmad Odeh on Unsplash)

Animated API

  • create an Animated.Value
  • hook it up to style attributes of an animated component (e.g., Animated.View)

Moving Header


No more missing translations

Image for post
Image for post
Photo by Vladislav Klapin on Unsplash.

Internationalization Library

Translations in JSON


Hacking functions to have named parameters

Image for post
Image for post
Photo by Max Kleinen on Unsplash.

“[A named parameter is a] computer language’s support for function calls that clearly state the name of each parameter within the function call.” …


The Problem with Time & Timezones

Scene

Image for post
Image for post
Source


Image for post
Image for post
Enzyme or Enzyme?

Updating state onEvent

  • we mount a component and get a wrapper
  • prop.value of the tab has initially value before
  • a click event is simulated
  • prop.value should have value after
const tab = wrapper.find('.tab');
expect(tab.props().value).toEqual('before');
tab.find('button').simulate('click');
expect(tab.props().value).toEqual('after');


Image for post
Image for post
Source

Flux / Redux intro


GRASP = object oriented design with responsibilities

Creator

Image for post
Image for post
The Creation of Adam by Michelangelo
  • B “contains” or compositely aggregates A. …


Image for post
Image for post
React and TypeScript

Problem description

enum Country {
POLAND,
US,
GERMANY
}
function getCurrency(country: Country) {
switch (country) {
case Country.POLAND:
return "ZLOTY";
case Country.US:
return "DOLLAR";
case Country.GERMANY:
return "EURO";
}
}


Image for post
Image for post
React Lifecycle Methods Diagram since v16.4 (source)

Refactoring Legacy Lifecycle Methods


Image for post
Image for post
Front-end arsenal (image)
  • Responsive design (CSS, TypeScript, and Jest),
  • Object-oriented SCSS,
  • Advanced testing in Jest.

Responsive design

About

Krzysztof Kwieciński

Software Craftsman who loves learning new things and is always eager to share his knowledge with others

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store