diff --git a/src/data/roadmaps/react-native/content/core-components/activity-indicator.md b/src/data/roadmaps/react-native/content/core-components/activity-indicator.md index ccafbe951..e03d42da8 100644 --- a/src/data/roadmaps/react-native/content/core-components/activity-indicator.md +++ b/src/data/roadmaps/react-native/content/core-components/activity-indicator.md @@ -2,22 +2,6 @@ The `ActivityIndicator` is a core component in React Native that provides a simple visual indication of some ongoing activity or loading state within your application. It shows a spinning animation, which gives the user feedback that something is happening in the background. This component is particularly useful when fetching data from an external source, like a server, or while performing time-consuming operations. -To use the `ActivityIndicator` component, simply import it from 'react-native', and add it to your component tree. You can customize the appearance and behavior of the `ActivityIndicator` by providing various optional props, such as `animating`, `color`, and `size`. +Visit the following resources to learn more: -Below is an example of how to use the `ActivityIndicator` component within a functional React component: - -```javascript -import React from 'react'; -import { ActivityIndicator, View, Text } from 'react-native'; - -const LoadingScreen = () => ( - - Loading, please wait... - - -); - -export default LoadingScreen; -``` - -In this example, the `ActivityIndicator` is placed within a `View` component alongside a `Text` component. The `ActivityIndicator` has its `size` set to 'large' and `color` set to blue. By default, the component will be animating. If you want to control the animation, you can use the `animating` prop and set it to `true` or `false`. \ No newline at end of file +- [@official@Activity Indicator](https://reactnative.dev/docs/activityindicator) diff --git a/src/data/roadmaps/react-native/content/core-components/button.md b/src/data/roadmaps/react-native/content/core-components/button.md index 4e1774405..261d9c73b 100644 --- a/src/data/roadmaps/react-native/content/core-components/button.md +++ b/src/data/roadmaps/react-native/content/core-components/button.md @@ -2,33 +2,6 @@ A `Button` is a built-in React Native component used to create clickable buttons. It is a simple, customizable and easy-to-use component that captures touches and triggers an `onPress` event when pressed. -Here's a simple example of how to create a Button in React Native: +Visit the following resources to learn more: -```javascript -import React from 'react'; -import { Button } from 'react-native'; - -const MyButton = () => { - const onPressHandler = () => { - alert('Button Pressed'); - }; - - return ( - - - ); -} -``` - -Remember: do not modify the state directly; always use the `setState()` method or updater function provided by the `useState` hook. +Visit the following resources to learn more: - [@official@Component State](https://react.dev/learn/managing-state) \ No newline at end of file diff --git a/src/data/roadmaps/react-native/content/publishing-apps/app-store.md b/src/data/roadmaps/react-native/content/publishing-apps/app-store.md index 6728be401..b9782c889 100644 --- a/src/data/roadmaps/react-native/content/publishing-apps/app-store.md +++ b/src/data/roadmaps/react-native/content/publishing-apps/app-store.md @@ -2,5 +2,7 @@ The App Store is Apple's official platform for distributing iOS apps to users with iPhones, iPads, and iPod Touch devices. To publish an app on the App Store, you need to follow specific guidelines and use the necessary tools provided by Apple. -- [@article@Publishing to Apple App Store](https://reactnative.dev/docs/publishing-to-app-store) +Visit the following resources to learn more: + +- [@official@Publishing to Apple App Store](https://reactnative.dev/docs/publishing-to-app-store) - [@feed@Explore top posts about App Store](https://app.daily.dev/tags/app-store?ref=roadmapsh) diff --git a/src/data/roadmaps/react-native/content/publishing-apps/google-store.md b/src/data/roadmaps/react-native/content/publishing-apps/google-store.md index 79003830d..9fdbca0d8 100644 --- a/src/data/roadmaps/react-native/content/publishing-apps/google-store.md +++ b/src/data/roadmaps/react-native/content/publishing-apps/google-store.md @@ -2,5 +2,7 @@ Publishing your React Native app on Google Store consists of several steps. -- [@article@Publishing to Google Play Store](https://reactnative.dev/docs/signed-apk-android) +Visit the following resources to learn more: + +- [@official@Publishing to Google Play Store](https://reactnative.dev/docs/signed-apk-android) - [@feed@Explore top posts about Google](https://app.daily.dev/tags/google?ref=roadmapsh) diff --git a/src/data/roadmaps/react-native/content/publishing-apps/index.md b/src/data/roadmaps/react-native/content/publishing-apps/index.md index a4887c7a9..468c6ee3b 100644 --- a/src/data/roadmaps/react-native/content/publishing-apps/index.md +++ b/src/data/roadmaps/react-native/content/publishing-apps/index.md @@ -1,3 +1,8 @@ # Publishing Apps -Publishing React Native apps is the process of deploying your application on various app stores so that users can download and use your app. The two most popular app stores for publishing are the Apple App Store (iOS) and the Google Play Store (Android). \ No newline at end of file +Publishing React Native apps is the process of deploying your application on various app stores so that users can download and use your app. The two most popular app stores for publishing are the Apple App Store (iOS) and the Google Play Store (Android). + +Visit the following resources to learn more: + +- [@official@Publishing to Apple App Store](https://reactnative.dev/docs/publishing-to-app-store) +- [@official@Publishing to Google Play Store](https://reactnative.dev/docs/signed-apk-android) diff --git a/src/data/roadmaps/react-native/content/push-notifications.md b/src/data/roadmaps/react-native/content/push-notifications.md index 7ee92471f..912bff5a0 100644 --- a/src/data/roadmaps/react-native/content/push-notifications.md +++ b/src/data/roadmaps/react-native/content/push-notifications.md @@ -5,4 +5,8 @@ Push notifications are a way to engage and retain users by delivering alerts, me In React Native, you can implement push notifications using third-party libraries or services. Some popular options are: - Firebase Cloud Messaging (FCM) for both Android and iOS -- Apple Push Notification Service (APNs) for iOS \ No newline at end of file +- Apple Push Notification Service (APNs) for iOS + +Visit the following resources to learn more: + +- [@article@React Native Push Notifications](https://blog.logrocket.com/react-native-push-notifications-complete-guide/) \ No newline at end of file diff --git a/src/data/roadmaps/react-native/content/security/authentication.md b/src/data/roadmaps/react-native/content/security/authentication.md index 6c54a18eb..63234ae1c 100644 --- a/src/data/roadmaps/react-native/content/security/authentication.md +++ b/src/data/roadmaps/react-native/content/security/authentication.md @@ -6,7 +6,7 @@ Authentication is a crucial aspect of securing your React Native application. It - OAuth - Simple Token Authentication -Have a look at the following react native page for further details about security. +Visit the following resources to learn more: -- [@article@Authentication and Deep Linking](https://reactnative.dev/docs/security#authentication-and-deep-linking) +- [@official@Authentication and Deep Linking](https://reactnative.dev/docs/security#authentication-and-deep-linking) - [@feed@Explore top posts about Authentication](https://app.daily.dev/tags/authentication?ref=roadmapsh) diff --git a/src/data/roadmaps/react-native/content/security/index.md b/src/data/roadmaps/react-native/content/security/index.md index 6bb4bc671..e5a3ec477 100644 --- a/src/data/roadmaps/react-native/content/security/index.md +++ b/src/data/roadmaps/react-native/content/security/index.md @@ -1,84 +1,10 @@ # Security -# React Native Security +Security is a vital consideration in React Native application development, as it helps protect user data and sensitive information. Key best practices include using secure storage solutions for sensitive data, such as authentication tokens and user credentials, with libraries like `react-native-keychain` and `react-native-encrypted-storage`. For secure communication, always use HTTPS for API interactions to ensure that data exchanged between the client and server is encrypted. Additionally, minimize permissions by requesting only those necessary for the app's functionality, ideally at runtime, using libraries like `react-native-permissions`. -React Native is a framework for building cross-platform mobile applications using JavaScript and ReactJS. As with any application development, security is a crucial aspect to protect your application data and user information. Here is a brief overview of some React Native security best practices. +Validating and sanitizing user input is crucial to prevent threats like SQL injection and cross-site scripting (XSS), which can be achieved with validation libraries such as `Yup`. Lastly, keeping dependencies up to date is essential to avoid known security vulnerabilities; tools like `npm audit` and Dependabot can assist in this process. By adhering to these best practices, developers can enhance the security of their React Native applications, safeguarding both application data and user information. -## 1. Secure Storage -Store sensitive data, such as authentication tokens, encryption keys, or user credentials, securely using a storage solution that comes with built-in encryption mechanisms. +Visit the following resources to learn more: -### Example: -For React Native, [react-native-keychain](https://github.com/oblador/react-native-keychain) and [react-native-encrypted-storage](https://github.com/emeraldsanto/react-native-encrypted-storage) are popular libraries handling secure storage. - -```javascript -import * as Keychain from 'react-native-keychain'; - -// Save data to the keychain -await Keychain.setGenericPassword(username, password); - -// Retrieve data from the keychain -const credentials = await Keychain.getGenericPassword(); -``` - -## 2. Secure Communication -Use HTTPS for network communication with APIs and remote services. This ensures that the data exchanged between server and client is encrypted and secure. - -### Example: -Use the [fetch](https://reactnative.dev/docs/network) method with URLs starting with 'https://'. - -```javascript -const response = await fetch('https://example.com/api/data'); -const data = await response.json(); -``` - -## 3. Minimize Permissions -Request only the necessary permissions from the user that your application needs to function, and do this at runtime when the feature actually needs the permission. - -### Example: -Using [react-native-permissions](https://github.com/zoontek/react-native-permissions), you can request permissions when they are needed: - -```javascript -import {check, PERMISSIONS, request, RESULTS} from 'react-native-permissions'; - -async function requestLocationPermission() { - const result = await check(PERMISSIONS.IOS.LOCATION_WHEN_IN_USE); - - if (result === RESULTS.DENIED) { - return await request(PERMISSIONS.IOS.LOCATION_WHEN_IN_USE); - } - - return result; -} -``` - -## 4. Validate User Input -Ensure you validate and sanitize all user input before processing it. This helps to prevent potential threats like SQL injection or cross-site scripting (XSS). - -### Example: -Use a validation library like [Yup](https://github.com/jquense/yup) to validate user input. - -```javascript -import * as Yup from 'yup'; - -const loginSchema = Yup.object({ - email: Yup.string().email('Invalid email address').required('Required'), - password: Yup.string() - .min(8, 'Password must be at least 8 characters') - .required('Required'), -}); - -loginSchema.validate({email: 'user@example.com', password: 'password'}); -``` - -## 5. Keep Dependencies Up to Date -Regularly update your dependencies to ensure they don't contain known security vulnerabilities. Use tools like [npm audit](https://docs.npmjs.com/cli/commands/npm-audit) and [dependabot](https://github.com/dependabot/dependabot-core) to automatically audit and update your dependencies. - -### Example: -Using npm, you can update your dependencies and check for potential vulnerabilities: - -```bash -npm update -npm audit -``` - -Following these best practices will help you create more secure React Native applications, protecting your application's data and your users' information. \ No newline at end of file +- [@official@Security](https://reactnative.dev/docs/security) +- [@article@Secure Authentication and Authorization in React Native](https://medium.com/@christopherobocha/secure-authentication-and-authorisation-in-react-native-a260f1787a89) diff --git a/src/data/roadmaps/react-native/content/security/networking.md b/src/data/roadmaps/react-native/content/security/networking.md index e78a51728..092707a77 100644 --- a/src/data/roadmaps/react-native/content/security/networking.md +++ b/src/data/roadmaps/react-native/content/security/networking.md @@ -1,9 +1,14 @@ # Networking -React Native offers various ways to handle networking tasks like making API calls, sending/receiving data from remote servers, and handling different network protocols. +Networking in React Native primarily uses the Fetch API and XMLHttpRequest for making network requests. These APIs allow you to retrieve data from remote servers and handle asynchronous operations easily. React Native offers various ways to handle networking tasks like making API calls, sending/receiving data from remote servers, and handling different network protocols. - Fetch - HTTP Call Libraries - Web Sockets -These are the major ways to handle networking tasks in React Native. Choose the method that best suits your specific use case and allows you to take full advantage of the features offered. \ No newline at end of file +These are the major ways to handle networking tasks in React Native. Choose the method that best suits your specific use case and allows you to take full advantage of the features offered. + +Visit the following resources to learn more: + +- [@official@Networking](https://reactnative.dev/docs/network) +- [@article@Efficient Network Communication](https://medium.com/@Blochware/efficient-network-communication-best-practices-for-handling-api-calls-in-react-native-b5bebbc8ba71) diff --git a/src/data/roadmaps/react-native/content/security/storage.md b/src/data/roadmaps/react-native/content/security/storage.md index 98d092bc6..7991b02df 100644 --- a/src/data/roadmaps/react-native/content/security/storage.md +++ b/src/data/roadmaps/react-native/content/security/storage.md @@ -8,3 +8,8 @@ React Native provides a few ways to persist data locally in the app. Here's a br - Expo SQLite Choose the storage option that best fits your app's requirements and use cases. Keep in mind that AsyncStorage and SecureStorage are more suited for small-scale data storage, while Realm and SQLite support more complex storage and querying needs. + +Visit the following resources to learn more: + +- [@official@AsyncStorage](https://reactnative.dev/docs/asyncstorage) +- [@article@Best Data Storage Option for React Native Apps](https://dev.to/ammarahmed/best-data-storage-option-for-react-native-apps-42k) diff --git a/src/data/roadmaps/react-native/content/storage/async-storage.md b/src/data/roadmaps/react-native/content/storage/async-storage.md index fc37f9f4e..9d5346ff2 100644 --- a/src/data/roadmaps/react-native/content/storage/async-storage.md +++ b/src/data/roadmaps/react-native/content/storage/async-storage.md @@ -1,6 +1,8 @@ -# react-native-async-storage +# React Native Async Storage -An asynchronous, unencrypted, persistent, key-value storage system for React Native. +React Native AsyncStorage is an unencrypted, asynchronous, persistent key-value storage system that allows developers to store data globally within their applications. It is primarily used for persisting data offline, making it suitable for scenarios like saving user preferences or session data. -- [@opensource@Visit the Documentation](https://github.com/react-native-async-storage/async-storage) -- [@feed@Explore top posts about Storage](https://app.daily.dev/tags/storage?ref=roadmapsh) +Visit the following resources to learn more: + +- [@official@Async Storage](https://reactnative.dev/docs/asyncstorage) +- [@opensource@Async Storage - Github](https://github.com/react-native-async-storage/async-storage) diff --git a/src/data/roadmaps/react-native/content/storage/expo-file-system.md b/src/data/roadmaps/react-native/content/storage/expo-file-system.md index e30c004e4..354e2db6b 100644 --- a/src/data/roadmaps/react-native/content/storage/expo-file-system.md +++ b/src/data/roadmaps/react-native/content/storage/expo-file-system.md @@ -2,84 +2,6 @@ Expo File System is a universal module that provides access to the file system on the device. Using this module, you can perform various file operations like reading, writing, copying, moving, and deleting files and folders. It also supports reading file metadata and querying file URI. -To use the Expo File System library, you need to install the `expo-file-system` package: +Visit the following resources to learn more: -```bash -expo install expo-file-system -``` - -First, import the `expo-file-system` module: - -```javascript -import * as FileSystem from 'expo-file-system'; -``` - -Here are some examples of how to use the Expo File System: - -## Reading a file - -```javascript -async function readFileAsync() { - const fileUri = FileSystem.documentDirectory + 'myFile.txt'; - - try { - const content = await FileSystem.readAsStringAsync(fileUri); - console.log('File content:', content); - } catch (error) { - console.error('Error while reading file:', error); - } -} -``` - -## Writing a file - -```javascript -async function writeFileAsync() { - const fileUri = FileSystem.documentDirectory + 'myFile.txt'; - const content = 'Hello, World!'; - - try { - await FileSystem.writeAsStringAsync(fileUri, content); - console.log('File written successfully'); - } catch (error) { - console.error('Error while writing file:', error); - } -} -``` - -## Copying & Moving a file - -```javascript -async function copyAndMoveFileAsync() { - const srcUri = FileSystem.documentDirectory + 'myFile.txt'; - const destUri = FileSystem.documentDirectory + 'copiedFile.txt'; - - try { - await FileSystem.copyAsync({ from: srcUri, to: destUri }); - console.log('File copied successfully'); - - const newDestUri = FileSystem.documentDirectory + 'movedFile.txt'; - await FileSystem.moveAsync({ from: destUri, to: newDestUri }); - console.log('File moved successfully'); - } catch (error) { - console.error('Error while copying/moving file:', error); - } -} -``` - -## Deleting a file - -```javascript -async function deleteFileAsync() { - const fileUri = FileSystem.documentDirectory + 'myFile.txt'; - - try { - await FileSystem.deleteAsync(fileUri); - console.log('File deleted successfully'); - } catch (error) { - console.error('Error while deleting file:', error); - } -} -``` - -I hope this brief summary of Expo File System helps you understand its functionality and usage. Remember to visit the [official documentation](https://docs.expo.dev/versions/latest/sdk/filesystem/) for more details and other available features. \ No newline at end of file +- [@official@Expo File System](https://docs.expo.dev/versions/latest/sdk/filesystem/) diff --git a/src/data/roadmaps/react-native/content/storage/expo-secure-store.md b/src/data/roadmaps/react-native/content/storage/expo-secure-store.md index 0e5fedc4a..53c77e1a7 100644 --- a/src/data/roadmaps/react-native/content/storage/expo-secure-store.md +++ b/src/data/roadmaps/react-native/content/storage/expo-secure-store.md @@ -2,65 +2,7 @@ Expo Secure Store is a built-in package provided by the Expo SDK to store encrypted data securely on users' devices. It is a key-value storage system, but it is not designed to store larger amounts of data such as app databases or complex data structures. It is most appropriate for storing secret keys, access tokens, and small user preferences. -First, you need to install the package by running: +Visit the following resources to learn more: -```bash -expo install expo-secure-store -``` - -Then, import the module into your app: - -```javascript -import * as SecureStore from 'expo-secure-store'; -``` - -## Saving Data - -To save data to the secure store, use the `setItemAsync` method. It takes two arguments: a key and a value. Both should be strings. - -```javascript -async function saveData() { - try { - await SecureStore.setItemAsync('your_key', 'your_value'); - console.log('Data saved successfully!'); - } catch (error) { - console.error('Error saving data:', error); - } -} -``` - -## Retrieving Data - -To retrieve data from the secure store, use the `getItemAsync` method, which takes the key as a parameter and returns a Promise that resolves to the value. - -```javascript -async function getData() { - try { - const value = await SecureStore.getItemAsync('your_key'); - if (value !== null) { - console.log('Data retrieved:', value); - } else { - console.log('No data found with that key.'); - } - } catch (error) { - console.error('Error retrieving data:', error); - } -} -``` - -## Deleting Data - -To delete data from the secure store, use the `deleteItemAsync` method. It takes the key as a parameter. - -```javascript -async function deleteData() { - try { - await SecureStore.deleteItemAsync('your_key'); - console.log('Data deleted successfully!'); - } catch (error) { - console.error('Error deleting data:', error); - } -} -``` - -Please note that Expo Secure Store uses different security mechanisms based on the platform (iOS or Android). Additionally, while the store is encrypted, remember that it is not foolproof, and a determined attacker may be able to extract data. However, it provides a good balance between security and usability for most use cases. \ No newline at end of file +- [@official@secure-store](https://docs.expo.dev/versions/latest/sdk/securestore/) +- [@opensource@expo-secure-store package](https://www.npmjs.com/package/expo-secure-store?activeTab=readme) diff --git a/src/data/roadmaps/react-native/content/storage/expo-sqlite.md b/src/data/roadmaps/react-native/content/storage/expo-sqlite.md index ac0a4e652..b31d85704 100644 --- a/src/data/roadmaps/react-native/content/storage/expo-sqlite.md +++ b/src/data/roadmaps/react-native/content/storage/expo-sqlite.md @@ -1,5 +1,9 @@ # expo-sqlite -Expo SQLite is a powerful tool for handling local SQLite databases in your React Native application. By using this API, you can create, read, update, and delete data as needed, without writing native code. Expo SQLite is available as part of the [expo-sqlite](https://docs.expo.dev/versions/latest/sdk/sqlite/) package, which provides an easy-to-use interface for SQLite functionalities. +Expo SQLite is a powerful tool for handling local SQLite databases in your React Native application. By using this API, you can create, read, update, and delete data as needed, without writing native code. Expo SQLite is available as part of the expo-sqlite package, which provides an easy-to-use interface for SQLite functionalities. -With Expo SQLite, you can efficiently manage SQLite databases within your React Native applications. It enables you to perform various database operations without the need for writing native code. \ No newline at end of file +With Expo SQLite, you can efficiently manage SQLite databases within your React Native applications. It enables you to perform various database operations without the need for writing native code. + +Visit the following resources to learn more: + +- [@official@expo-sqlite](https://docs.expo.dev/versions/latest/sdk/sqlite/) diff --git a/src/data/roadmaps/react-native/content/storage/index.md b/src/data/roadmaps/react-native/content/storage/index.md index 1de740436..1fc44be50 100644 --- a/src/data/roadmaps/react-native/content/storage/index.md +++ b/src/data/roadmaps/react-native/content/storage/index.md @@ -1,10 +1,7 @@ # Storage -React Native provides a few ways to persist data locally in the app. Here's a brief summary of the storage options available: +React Native offers several methods for persisting data locally within applications, each catering to different storage needs and use cases. The primary options include Async Storage, which provides a simple key-value storage system suitable for small-scale data; Expo Secure Store, designed for securely storing sensitive information; Expo File System, which allows for file management and storage; and Expo SQLite, which supports more complex data storage and querying capabilities. When selecting a storage option, it's essential to consider the specific requirements of your app. -- Async Storage -- Expo Secure Store -- Expo File System -- Expo SQLite +Visit the following resources to learn more: -Choose the storage option that best fits your app's requirements and use cases. Keep in mind that AsyncStorage and SecureStorage are more suited for small-scale data storage, while Realm and SQLite support more complex storage and querying needs. \ No newline at end of file +- [@article@Best Data Storage Option for React Native Apps](https://dev.to/ammarahmed/best-data-storage-option-for-react-native-apps-42k) diff --git a/src/data/roadmaps/react-native/content/storage/other-storage-options.md b/src/data/roadmaps/react-native/content/storage/other-storage-options.md index d0b4b789a..898d5b401 100644 --- a/src/data/roadmaps/react-native/content/storage/other-storage-options.md +++ b/src/data/roadmaps/react-native/content/storage/other-storage-options.md @@ -2,8 +2,11 @@ Besides AsyncStorage, there are other options available for handling data storage in React Native applications. This guide will briefly cover some popular options: Realm, Firebase Realtime Database, and SQLite. -- [@opensource@Realm](https://github.com/realm/realm-js) -- [@article@Firebase Realtime Database](https://firebase.google.com/docs/database) -- [@feed@Explore top posts about Storage](https://app.daily.dev/tags/storage?ref=roadmapsh) - These are just a few examples of additional storage options for React Native. Depending on your requirements, you may choose the one that best fits your project. + +Visit the following resources to learn more: + +- [@official@Async Storage](https://reactnative.dev/docs/asyncstorage) +- [@opensource@Realm - Github](https://github.com/realm/realm-js) +- [@article@Firebase Realtime Database](https://firebase.google.com/docs/database) +- [@feed@Explore top posts about Storage](https://app.daily.dev/tags/storage?ref=roadmapsh) \ No newline at end of file diff --git a/src/data/roadmaps/react-native/content/styling/accessibility.md b/src/data/roadmaps/react-native/content/styling/accessibility.md index 02f05cb18..0078e5106 100644 --- a/src/data/roadmaps/react-native/content/styling/accessibility.md +++ b/src/data/roadmaps/react-native/content/styling/accessibility.md @@ -1,89 +1,7 @@ # Accessibility -Accessibility (a11y) in React Native allows you to create applications that are usable to everyone, including people with disabilities. It provides a set of attributes and APIs to customize UI components by considering diverse user needs. +Accessibility (often abbreviated as a11y) in React Native is a crucial aspect of application development that ensures your applications are usable by everyone, including individuals with disabilities. This commitment to inclusivity is not just a legal requirement in many jurisdictions but also a moral imperative that enhances the user experience for all. React Native provides a comprehensive set of accessibility features, attributes, and APIs that allow developers to create applications that cater to diverse user needs. By implementing these features, developers can ensure that their applications are navigable and usable by individuals with visual, auditory, motor, or cognitive impairments. -## Accessibility Props +Visit the following resources to learn more: -React Native provides several accessibility properties that can be applied to components for enhancing their a11y features: - -`accessible` : (Boolean) - Indicates if the element can be focused by screen readers. -```jsx - -``` - -`accessibilityLabel` : (String) - Used by the screen reader to describe the element to the user. -```jsx - -``` - -`accessibilityHint` : (String) - Gives a hint to the user of the components behavior. -```jsx - -``` - -`accessibilityRole` : (String) - Describes the role of the element for the screen reader. -```jsx - -``` - -`accessibilityValue` : (Object with properties: min, max, now) - Defines the accessibility values for elements such as progress bars or sliders, among others. - -```jsx - -``` - -`accessibilityState` : (Object) - Represents the current state of the component. -```jsx - -``` - -`accessibilityActions` and `onAccessibilityAction` are used to create custom actions. -```jsx -import { AccessibilityInfo, Text, View } from 'react-native'; - -function CustomButton() { - const [count, setCount] = React.useState(0); - - const onIncrement = () => { - setCount(count + 1); - }; - - React.useEffect(() => { - const announce = () => { - AccessibilityInfo.announceForAccessibility(`Count raised to ${count}`); - }; - announce(); - }, [count]); - - return ( - { - switch (event.nativeEvent.actionName) { - case "increment": - onIncrement(); - break; - } - }} - > - Increment Counter: {count} - - ); -} -``` - -Of course, different platforms may have some exclusive accessibility properties, which can be found in the [official React Native documentation](https://reactnative.dev/docs/accessibility). \ No newline at end of file +- [@official@Accessibility](https://reactnative.dev/docs/accessibility) \ No newline at end of file diff --git a/src/data/roadmaps/react-native/content/styling/index.md b/src/data/roadmaps/react-native/content/styling/index.md index 5919baf6b..3118b8e89 100644 --- a/src/data/roadmaps/react-native/content/styling/index.md +++ b/src/data/roadmaps/react-native/content/styling/index.md @@ -1,87 +1,9 @@ # Styling -Styling in React Native is accomplished through JavaScript and uses a subset of CSS properties. Unlike CSS in web development, React Native has its own set of components and styling rules. The main components used for styling are `StyleSheet`, `View`, and `Text`. - -## StyleSheet +Styling in React Native is accomplished through JavaScript and uses a subset of CSS properties. Unlike CSS in web development, React Native has its own set of components and styling rules. The main components used for styling are `StyleSheet`, `View`, and `Text`. `StyleSheet` is a module provided by React Native to manage and optimize styles. It is similar to a CSS stylesheet and helps in creating and working with multiple styles efficiently. -```jsx -import { StyleSheet, View, Text } from 'react-native'; - -const styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: '#fff', - alignItems: 'center', - justifyContent: 'center', - }, - text: { - fontSize: 20, - fontWeight: 'bold', - }, -}); -``` - -## View and Text components - -`View` and `Text` components are the basic building blocks for creating a user interface in React Native. They are used to add structure and style to the layout. - -```jsx -import React from 'react'; -import { StyleSheet, View, Text } from 'react-native'; - -export default function App() { - return ( - - Hello, React Native! - - ); -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: '#fff', - alignItems: 'center', - justifyContent: 'center', - }, - text: { - fontSize: 20, - fontWeight: 'bold', - }, -}); -``` - -## Inline styles - -In some cases, you might prefer to apply styles directly to a component using inline styling. However, it is not recommended for larger applications due to performance issues. - -```jsx -import React from 'react'; -import { View, Text } from 'react-native'; - -export default function App() { - return ( - - - Hello, React Native! - - - ); -} -``` +Visit the following resources to learn more: -In summary, styling in React Native is done through JavaScript using a subset of CSS properties. The main components used for styling are `StyleSheet`, `View`, and `Text`. You can also use inline styles when necessary, although it's not recommended for performance reasons. \ No newline at end of file +- [@official@Styling](https://reactnative.dev/docs/style) \ No newline at end of file diff --git a/src/data/roadmaps/react-native/content/styling/layouts.md b/src/data/roadmaps/react-native/content/styling/layouts.md index 484ace174..f5d378c97 100644 --- a/src/data/roadmaps/react-native/content/styling/layouts.md +++ b/src/data/roadmaps/react-native/content/styling/layouts.md @@ -2,56 +2,9 @@ In React Native, layouts are primarily managed using the Flexbox styling system. Flexbox is a powerful and flexible layout system that allows you to create responsive and complex UIs using a set of simple rules. -## Flexbox - -Flexbox consists of three key elements: the `container`, `main axis`, and `cross axis`. -- The `container` is the parent flex container that holds and distributes all the child elements. -- The `main axis` is the primary direction of the layout (horizontal or vertical). -- The `cross axis` is the perpendicular direction, opposite of the main axis. - -Here are some of the most commonly used Flexbox styles: - -- **`flexDirection`**: This style specifies the primary axis using four possible values: `row`, `row-reverse`, `column`, or `column-reverse`. -```jsx - - First child - Second child - -``` - -- **`alignItems`**: This style is used to align the child items along the cross-axis. It uses the values `flex-start`, `flex-end`, `center`, `stretch`, or `baseline`. -```jsx - - First child - Second child - -``` - -- **`justifyContent`**: This style is used to align the child items along the main axis. It accepts the values `flex-start`, `flex-end`, `center`, `space-between`, or `space-around`. -```jsx - - First child - Second child - -``` - -- **`flexWrap`**: Set to either `wrap` or `nowrap` to specify if child items should wrap around to the next line when there's not enough space on the current line. -```jsx - - First child - Second child - Third child - -``` - -- **`flex`**: This style determines how the child items grow or shrink when there's remaining space in the container. It's a shorthand for `grow`, `shrink`, and `flex-basis`. -```jsx - - First child - Second child - -``` - You can use these styles in various combinations to create flexible layouts in React Native. Flexbox makes it easy to create responsive UIs that adapt to changes in screen size or orientation. Note that some of these styles might not work as expected in React Native compared to in CSS for the web, but the overall concepts remain the same. -To learn more about these styling properties, you can refer to the [official React Native documentation](https://reactnative.dev/docs/flexbox). \ No newline at end of file +Visit the following resources to learn more: + +- [@official@Flexbox](https://reactnative.dev/docs/flexbox) +- [@official@Layout Props](https://reactnative.dev/docs/layout-props) \ No newline at end of file diff --git a/src/data/roadmaps/react-native/content/styling/stylesheets.md b/src/data/roadmaps/react-native/content/styling/stylesheets.md index ef6de6829..7a29e5c14 100644 --- a/src/data/roadmaps/react-native/content/styling/stylesheets.md +++ b/src/data/roadmaps/react-native/content/styling/stylesheets.md @@ -2,87 +2,6 @@ In React Native, stylesheets are objects that define the appearance of components. They provide a way to separate styling from the component's logic. Stylesheets are created using `StyleSheet.create` method, which ensures a standardized and efficient way to manage styles for your components. -## Creating a stylesheet +Visit the following resources to learn more: -You can create a stylesheet by importing `StyleSheet` from 'react-native', and then defining your styles using `StyleSheet.create` method. - -```jsx -import { StyleSheet } from 'react-native'; - -const styles = StyleSheet.create({ - container: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#F5FCFF', - }, - text: { - fontSize: 20, - textAlign: 'center', - margin: 10, - }, -}); -``` - -## Applying styles to components - -To apply styles, simply reference the style object from your stylesheet using `styles.styleName`. For example: - -```jsx -import React from 'react'; -import { View, Text, StyleSheet } from 'react-native'; - -const App = () => { - return ( - - Hello, React Native! - - ); -}; - -const styles = StyleSheet.create({ - container: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#F5FCFF', - }, - text: { - fontSize: 20, - textAlign: 'center', - margin: 10, - }, -}); - -export default App; -``` - -## Combining styles - -You can combine multiple styles by passing an array of styles to the `style` prop of a component. The last style in the array takes precedence if there are conflicting styles. - -```jsx - - Hello, React Native! - - -// Adding backgroundRed to the existing styles -const styles = StyleSheet.create({ - container: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#F5FCFF', - }, - text: { - fontSize: 20, - textAlign: 'center', - margin: 10, - }, - backgroundRed: { - backgroundColor: 'red', - }, -}); -``` - -That's a brief summary of stylesheets in React Native. You can now create, apply, and combine styles for your React Native components. \ No newline at end of file +- [@official@Stylesheets](https://reactnative.dev/docs/stylesheet) \ No newline at end of file diff --git a/src/data/roadmaps/react-native/content/testing/appium.md b/src/data/roadmaps/react-native/content/testing/appium.md index d5ef89e4a..d7e623752 100644 --- a/src/data/roadmaps/react-native/content/testing/appium.md +++ b/src/data/roadmaps/react-native/content/testing/appium.md @@ -1,9 +1,7 @@ # Appium -Appium is an open-source test automation framework for mobile devices, targeting native, hybrid, or mobile-web apps for iOS, Android, and Windows platforms. Appium works with multiple programming languages, including JavaScript, Ruby, Python, Java, and C#. +Appium is an open-source test automation framework for mobile devices, targeting native, hybrid, or mobile-web apps for iOS, Android, and Windows platforms. Appium works with multiple programming languages, including JavaScript, Ruby, Python, Java, and C#. Appium uses the WebDriver protocol, which allows you to write tests that can interact with your app through a series of commands. The WebDriver protocol interprets these commands into actions that are then performed on the app. -Appium uses the WebDriver protocol, which allows you to write tests that can interact with your app through a series of commands. The WebDriver protocol interprets these commands into actions that are then performed on the app. +Learn more from the following resources: -Learn more about Appium from the following resources: - -- [@official@Appium Documentation](http://appium.io/) \ No newline at end of file +- [@official@Appium Documentation](https://appium.io/docs/en/latest/) \ No newline at end of file diff --git a/src/data/roadmaps/react-native/content/testing/detox.md b/src/data/roadmaps/react-native/content/testing/detox.md index 16e3de6be..e312b276b 100644 --- a/src/data/roadmaps/react-native/content/testing/detox.md +++ b/src/data/roadmaps/react-native/content/testing/detox.md @@ -2,6 +2,6 @@ Detox is an end-to-end testing framework for React Native applications. It enables you to run tests on an actual device or in a simulator/emulator environment. The goal of Detox is to maintain a high level of confidence in your application's behavior while allowing for quick test runs and easy debugging. -Learn more about Detox from the following links: +Learn more from the following links: -- [@article@Detox Official Docs](https://wix.github.io/Detox/) \ No newline at end of file +- [@official@Detox Documentation](https://wix.github.io/Detox/) \ No newline at end of file diff --git a/src/data/roadmaps/react-native/content/testing/jest.md b/src/data/roadmaps/react-native/content/testing/jest.md index 13ea49246..298efee26 100644 --- a/src/data/roadmaps/react-native/content/testing/jest.md +++ b/src/data/roadmaps/react-native/content/testing/jest.md @@ -1,11 +1,10 @@ # Jest -Jest is a delightful JavaScript Testing Framework with a focus on simplicity. -It works with projects using: Babel, TypeScript, Node, React, Angular, Vue and more! +Jest is a delightful JavaScript Testing Framework with a focus on simplicity. It works with projects using: Babel, TypeScript, Node, React, Angular, Vue and more! Visit the following resources to learn more: -- [@article@Official Website](https://jestjs.io/) -- [@article@Official Documentation](https://jestjs.io/docs/getting-started) +- [@official@Jest](https://jestjs.io/) +- [@official@Jest Documentation](https://jestjs.io/docs/getting-started) - [@video@Jest Crash Course - Unit Testing in JavaScript](https://www.youtube.com/watch?v=7r4xVDI2vho) - [@feed@Explore top posts about Jest](https://app.daily.dev/tags/jest?ref=roadmapsh) diff --git a/src/data/roadmaps/react-native/content/testing/react-native-testing-library.md b/src/data/roadmaps/react-native/content/testing/react-native-testing-library.md index 093e25bc7..19bc55550 100644 --- a/src/data/roadmaps/react-native/content/testing/react-native-testing-library.md +++ b/src/data/roadmaps/react-native/content/testing/react-native-testing-library.md @@ -2,11 +2,7 @@ React Native Testing Library (RNTL) is a collection of tools and utilities to test React Native components. It is built on top of the Testing Library ecosystem, designed to work seamlessly with Jest and other testing frameworks. Its primary goal is to enable efficient and effective testing by providing simple and intuitive APIs that promote best practices, like testing UI components in isolation and promoting accessibility checks. -- It encourages testing from a user's perspective, focusing on interaction and accessibility rather than component implementation details. -- Built-in support for React Native's asynchronous APIs like `act` and `flushMicrotasksQueue`. -- Provides utility methods to query, fire events, and wait for elements in the components tree. - -Follow the links below for more details: +Visit the following resources to learn more: - [@article@React Native Testing Library](https://callstack.github.io/react-native-testing-library/) - [@article@React Native Testing Library (Docs)](https://testing-library.com/docs/react-native-testing-library/intro/) diff --git a/src/data/roadmaps/react-native/content/testing/react-test-renderer.md b/src/data/roadmaps/react-native/content/testing/react-test-renderer.md index 3378467f0..f9329a33a 100644 --- a/src/data/roadmaps/react-native/content/testing/react-test-renderer.md +++ b/src/data/roadmaps/react-native/content/testing/react-test-renderer.md @@ -2,5 +2,7 @@ React Test Renderer is a library provided by the React team that allows you to render React components as JavaScript objects without depending on the DOM or a native mobile environment. It can be used to test components in Node.js environments where the actual rendering is not required. -- [@article@React Test Renderer](https://jestjs.io/docs/tutorial-react) +Visit the following resources to learn more: + +- [@official@React Test Renderer](https://jestjs.io/docs/tutorial-react) - [@feed@Explore top posts about React](https://app.daily.dev/tags/react?ref=roadmapsh) diff --git a/src/data/roadmaps/react-native/content/using-native-modules/for-android.md b/src/data/roadmaps/react-native/content/using-native-modules/for-android.md index 8c73f69f9..f4bdf751f 100644 --- a/src/data/roadmaps/react-native/content/using-native-modules/for-android.md +++ b/src/data/roadmaps/react-native/content/using-native-modules/for-android.md @@ -1,6 +1,8 @@ # For Android -Visit the Native Modules documentation in react native documentation to learn more about this topic. +Native modules in React Native provide a powerful way to access device-specific features and capabilities that are not available through the standard React Native APIs. For example, a Bluetooth module can be created using the Android Bluetooth API, allowing applications to scan for nearby Bluetooth devices, connect to them, and transfer data. -- [@article@Android Native Modules](https://reactnative.dev/docs/turbo-native-modules-introduction?platforms=android) +Visit the following resources to learn more: + +- [@official@Android Native Modules](https://reactnative.dev/docs/legacy/native-modules-android) - [@feed@Explore top posts about Android](https://app.daily.dev/tags/android?ref=roadmapsh) diff --git a/src/data/roadmaps/react-native/content/using-native-modules/for-ios.md b/src/data/roadmaps/react-native/content/using-native-modules/for-ios.md index 436be7136..508854df1 100644 --- a/src/data/roadmaps/react-native/content/using-native-modules/for-ios.md +++ b/src/data/roadmaps/react-native/content/using-native-modules/for-ios.md @@ -1,6 +1,8 @@ # For iOS -Visit the Native Modules documentation in react native documentation to learn more about this topic. +iOS native modules in React Native allow developers to tap into the rich ecosystem of iOS features and functionalities that are not directly accessible through the standard React Native APIs. For instance, a Camera module can be implemented using the AVFoundation framework, enabling developers to capture photos and videos directly from their applications. -- [@article@iOS Native Modules](https://reactnative.dev/docs/turbo-native-modules-introduction?platforms=android) +Visit the following resources to learn more: + +- [@official@iOS Native Modules](https://reactnative.dev/docs/legacy/native-modules-ios) - [@feed@Explore top posts about iOS](https://app.daily.dev/tags/ios?ref=roadmapsh) diff --git a/src/data/roadmaps/react-native/content/using-native-modules/index.md b/src/data/roadmaps/react-native/content/using-native-modules/index.md index f30dd355f..30c37f130 100644 --- a/src/data/roadmaps/react-native/content/using-native-modules/index.md +++ b/src/data/roadmaps/react-native/content/using-native-modules/index.md @@ -4,4 +4,6 @@ Sometimes a React Native app needs to access a native platform API that is not a The NativeModule system exposes instances of Java/Objective-C/C++ (native) classes to JavaScript (JS) as JS objects, thereby allowing you to execute arbitrary native code from within JS. While we don't expect this feature to be part of the usual development process, it is essential that it exists. If React Native doesn't export a native API that your JS app needs you should be able to export it yourself! -- [@article@Native Modules Introduction](https://reactnative.dev/docs/native-platform) +Visit the following resources to learn more: + +- [@official@Native Modules Introduction](https://reactnative.dev/docs/native-platform)