So you have WordPress blog and you want to showcase it in your web app; however, your WordPress blog’s styles do not match your web app’s design system and you don’t want to maintain a PHP tech stack.

This blog will show how to create the below Gatsby blog that imports from a common UI library:


This blog is a tutorial on how to create a real-world scalable web app using Angular as frontend and Firebase as backend.

Screenshot of the Discussion Forum

What this article will cover:

  • How to create a database in Firebase.
  • How to query the database at the frontend using AngularFire.

Github Repo:

Github Page:

Tech Stack


react-intl is a library that helps to set up internationalization for a react app. It has been migrated to formatjs monorepo. There are instructions on formatjs website about the setup for react apps: https://formatjs.io/docs/getting-started/installation. Nx is a monorepo tool. This blog shows how to set up for Nx react app.

i18n for Nx React apps using formatjs
i18n for Nx React apps using formatjs
i18n for Nx React app using formatjs

The message declaration, we just need to use defineMessage, formatMessage or FormattedMessage: https://formatjs.io/docs/getting-started/message-declaration.

Message Extraction

However, for message extraction, we need to install @formatjs/cli and the command would be like:

# npm
npm run formatjs extract '{apps/<app-name>,libs/<library-name>}/src/**/*.{ts,tsx}' --out-file apps/<app-name>/src/translations/extracted-messages.json"
# yarn
yarn formatjs extract '{apps/<app-name>,libs/<library-name>}/src/**/*.{ts,tsx}' --out-file apps/<app-name>/src/translations/extracted-messages.json"

In the above command, we…


React-i18next is internationalization framework for React. This blog is a step-by-step guide about adding react-118next to a React project, such as:

  • How to config react-118next
  • How to sync with Redux state
  • How to extract translation
React-i18next

The example I am going to use:


What is a white-label app? According to Wikipedia:

A white-label product is a product or service produced by one company (the producer) that other companies (the marketers) rebrand to make it appear as if they had made it.

To build a white-label app, it needs some customization, it is not just simply change the logo or font style. However, it also could not be infinitely customizable; otherwise, it is building 2 completely different apps.

This blog shows how to create a white-label react application. The goal of this white-label react app that satisfies the below requirements:

  1. Can easily change the…


Harden up your code base with a solid set of unit tests

A collection of bicycles
A collection of bicycles
Photo by Berto Macario on Unsplash

Unit testing is critical for development, no matter how small the app is. This article blog will go through how I wrote unit tests for an example app.

It’ll explain some of my unit-testing strategies for different parts of a React app:

  • Services
  • Presentational components
  • Smart/container/connected components
  • Redux files
  • Hooks


Adding ESLint rules to sort imports statements and audit accessibility will ensure code consistency across the team and catch some errors early.

This blog shows how to:

  • add ESLint rules
  • add scripts in package.json
  • add pre-commit hooks

It assumes that your project already has ESLint installed.

ESLint Rules

This is the GitHub project I got with these ESLint rules added: https://github.com/xiongemi/white-label-airline.

Sort Imports

Install

Even though ESLint has this sort-imports rule (https://eslint.org/docs/rules/sort-imports); however, --fix will not reorder automatically for multiple lines.

However, we could use library eslint-plugin-import that allows --fix. To install:

# npm
npm install eslint-plugin-import --save-dev
# yarn
yarn add eslint-plugin-import --dev

Add Rules

Add…


If you have an Nx React project on GitHub, do you want to have free hosting of this app? This blog shows how to deploy an Nx React app to GitHub pages. GitHub pages provides free hosting for static pages for a GitHub repository. I am going to show you how to:

  • Deploy a sample flight search app
  • Change base href
Deploy Nx React app with GitHub Pages

GitHub Repo: https://github.com/xiongemi/white-label-airline

GitHub Pages: https://xiongemi.github.io/white-label-airline


Background: NG-ZORRO is an Angular UI library that is based on the Ant Design System used by Alibaba. I have heard about this library so many times, but I have never used it in the past.

I am a developer in Toronto right now and I mostly use Angular Material. I think NG-ZORRO is definitely popular in China. I always want to try it out so I have created a simple project using this library. This blog describes my developer experience using NG-ZORRO for the first time.

NG-ZORRO

Website: https://ng.ant.design

Github: https://github.com/NG-ZORRO/ng-zorro-antd

Below is a website I create using NG-ZORRO, it…


Problem I got: form handling is definitely a difficult task in Angular, or in any front-end frameworks. There are limitless interactions users could do with a form. I need to validate, show errors, and keep track of form status.

This blog will go through steps to create a pretty complex checkout form in Angular: https://xiongemi.github.io/angular-form-ngxs.

Sample checkout form
Sample checkout form
Sample checkout form

Github repo: https://github.com/xiongemi/angular-form-ngxs.

This blog will show my solution to these problems:

  • How to create a reusable form component
  • How to setup dynamic validation on form control
  • How to persist form values (using state management with NGXS)

Before We Start

HTML Form

We don’t need to re-invite the wheels, we…

Emily Xiong

A frontend web developer in Toronto

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