The code quality section is crucial for developers that are new to the React or React Native ecosystem. We introduce the tooling that is used to help teams develop better products and improve code stability. The static type analysis tool used in this module is Flowtype.
Introduce the idea of static type checking and show how it improves the code quality and developer experience. Write an example code covered with the typings, list all primitives and explain when flow infers the types.
The goal here is to show participants how to add Flow and ESLint to a new project or an existing codebase. We present different ways of using flow in the project, first as a global CLI with flow-remove-types and finally as a local dependency with types stripped from the bundle by Babel.
Explain basic flow configuration, .flowconfig file syntax and dive deeper into each of its sections. We’ll teach you how to ignore specific directories and the cons associated with that. At the end, we’ll show how to add typings for some libraries using `flow-typed`.
Adding Flowtype to existing codebases. We’ll introduce the concept of incremental adoption and show the way to gradually develop a well-typed codebase.
In this section we’ll cover all basic types, we’ll go through literal types, mixed and any types, maybe types, arrays, classes and tuples. After that, we’ll focus on highlighting the difference between weak and strong typings and show the different ways of typing Objects and Functions.
The advanced ways of using flow that includes using generic, union and intersection types will be presented to the audience. Every participant will gain the ability to perform a typecasting and suppress flow compiler errors with comments.
Typing Components and Higher-Order Components with flow. We’ll show how to support event handlers and reference functions. At the end, we’ll show how to type React’s children and explain the type difference between Element and Component.
I hereby agree for sending me by Callstack.io Sp. z o.o. with seat in Wrocław, by means of electronic communication to the e-mail address indicated by me, commercial information, within the meaning of the Act of 18 July 2002 on the provision of electronic services. For details see our Privacy Policy.