Build for Scale: Use a Design System in your React Native app. Part 2: Design Systems in React Native
Malik Chohra
React Native Mobile Engineer | Sharing Insights on Software Engineering | Digital Nomad Lifestyle | Passionate about Team Collaboration, processes and modern technology
Introduction
This series of build for scale: Is About the advanced way to use React native app.
I will talk about methods, best practices, how-to use guides, and advanced approaches on how to use the most used tools, and packages. Taking into account how to structure it in your app, how to architect the solution, and advanced approaches for a performant, secure, and scalable app.
This series is perfect for React Native developers of all levels who want to take their skills to the next level and build apps that stand the test of time. Whether you’re a seasoned professional or just starting, you’ll find invaluable knowledge and practical guidance to transform your React Native development journey I explained in the previous article how to optimise
In the first part, I talked more about the design systems in general and their reusability. In this one, I will be talking about the Mobile Design system, and some libraries that you can use to achieve that in react native.
What a Mobile Developer should include in the Design?System?
To develop a lightweight design system, you need to include as a must the following:
Visual Style?Guide:
This is like the DNA of your app’s appearance. It defines the look and feel, setting the tone for the entire user experience. Here’s what it entails:
You can check my article about using Icons here
UI Components Library:
Think of this as a toolbox filled with all the building blocks needed to create the app’s interface. It’s like having a set of Lego pieces that you can assemble and reuse across different screens. What you can include:
Other Components and Ideas
Dark Mode
How to create a Design system in React?Native:
To create a design system, you have two approaches: Start from scratch or custom a predefined library.
Start from Scratch
To start from scratch, you have different options.
For example, you use Pressable from React native to create your custom button. Define the Theme object and pass it using React Context to the rest of your app. You can define the spacing, and typography,?… and create your own components.
领英推荐
The only advantage to using Styled and not normal styling from React native is the clarity of code. You can have a good structure, easy-to-read code, and well-defined if you use Styled.
Customize a Component Library
One of the famous react native Component libraries are:
React Native Elements is a comprehensive UI toolkit for React Native, providing a wide range of customizable components and styles out of the box.
Why You should use it?
2. NativeBase
NativeBase is a cross-platform UI component library for React Native, offering a rich set of ready-to-use components with extensive customization options.
Why You should use it?
3. React Native Paper
React Native Paper is a material design component library for React Native, offering high-quality, customizable components that adhere to Google’s Material Design guidelines
Why you should use it?
Conclusion
This part was more about the Design system for Mobile, and specifically for tools to use if you want to create one using React Native. The next part will give an example of a Design system implementation using React Native and React native Paper
#reactnative #react #typescript #mobiledevelopment #engineering #patterns #bestpractices #memoryleak #performance #scaleApp #fastApp #userexperience
?