A Short Note – 7 Most Common Glossary Terms Used In React Navigation

Hello Readers, CoolMonkTechie heartily welcomes you in A Short Note Series (7 Most Common Glossary Terms Used In React Navigation).

In this note series, we will learn about commonly used React Navigation glossary terms in React Native. React Navigation glossary terms is the most common question asked in an interview with the experience react native developer. This note series shows some commonly used glossary terms of React Navigation in React Native.

So, Let’s begin.


1. Header

We also know header as navigation header, navigation bar, nav bar, and probably many other things. This is the rectangle at the top of your screen that contains the back button and the title for your screen. It often refers the entire rectangle to as the header in React Navigation.


2. Navigator and Navigation Container

A Navigator contains Screen elements as its children to define the configuration for routes.

Navigation Container is a component which manages our navigation tree and contains the navigation state. This component must wrap all navigators structure. 

Usually, we would render this component at the root of our app, which is usually the component exported from App.js.

function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator> // <---- This is a Navigator
        <Stack.Screen name="Home" component={HomeScreen} />
      </Stack.Navigator>
    </NavigationContainer>
  );
}


3. Screen Component

A screen component is a component that we use in our route configuration.

const Stack = createStackNavigator();

const StackNavigator = (
  <Stack.Navigator>
    <Stack.Screen
      name="Home"
      component={HomeScreen} // <----
    />
    <Stack.Screen
      name="Details"
      component={DetailsScreen} // <----
    />
  </Stack.Navigator>
);

We saw earlier that our screen components are provided with the navigation prop. It’s important to note that this only happens if the screen is rendered as a route by React Navigation.

For example, if we render DetailScreen as a child of HomeScreen, then DetailsScreen won’t be provided with the navigation prop, and when you press the “Go to Details.. again” button on the Home Screen, the app will throw one of JavaScript exceptions as “undefined is not an object”.

function HomeScreen() {
  return (
    <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
      <Text>Home Screen</Text>
      <Button
        title="Go to Details"
        onPress={() => navigation.navigate('Details')}
      />
      <DetailsScreen />
    </View>
  );
}


4. Navigation Prop

Each screen component in your app is provided with the navigation prop automatically. This prop will be passed into all screens, and it can be used for the following :

  • dispatch will send an action up to the router
  • navigate, goBack are available to dispatch actions in a convenient way.

Navigators can also accept a navigation prop, which they should get from the parent navigator, if there is one.


5. Router Prop

This prop will be passed into all screens. It contains information about current route, i.e. paramskey and name.


6. Navigation State

The state of a navigator looks something like this :

{
  key: 'StackRouterRoot',
  index: 1,
  routes: [
    { key: 'A', name: 'Home' },
    { key: 'B', name: 'Profile' },
  ]
}

For this navigation state, there are two routes which may be tabs, or cards in a stack. The index shows the active route, which is “B”.


7. Route

Each route is a piece of navigation state which contains a key to identify it, and a “name” to designate the type of route.It can also contain arbitrary params.

{
  key: 'B',
  name: 'Profile',
  params: { id: '123' }
}


Conclusion

In this note series, we understood the React Navigation glossary terms in React Native.

Thanks for reading! I hope you enjoyed and learned about React Navigation glossary terms. Reading is one thing, but the only way to master it is to do it yourself.

Please follow and subscribe to the blog and support us in any way possible. Also like and share the article with others for spread valuable knowledge.

You can find Other articles of CoolmonkTechie as below link :

You can also follow official website and tutorials of React Native as below links :

If you have any comments, questions, or think I missed something, leave them below in the comment box.

Thanks again Reading. HAPPY READING!!???

A Short Note – Is The Awesome Layers of Apple iOS Architecture Important ?

Hello Readers, CoolMonkTechie heartily welcomes you in A Short Note Series (Is The Awesome Layers of Apple iOS Architecture Important ?).

In this note series, we’ll learn about Apple iOS Architecture layers. The iOS is the operating system created by Apple Inc. for mobile devices. The iOS is used in many of the mobile devices for apple such as iPhone, iPod, iPad, etc.


So Let’s begin.

Overview

Is The Awesome Layers of Apple iOS Architecture Important? For Which purpose should we understand the Apple iOS Architecture Layers ?

Yes, It is important to understand the different layers of Apple iOS Architecture, because The Apple iOS Architecture is layered. It contains an intermediate layer between the applications and the hardware so they do not communicate directly. The lower layers in iOS provide the basic services, and the higher layers provide the user interface and sophisticated graphics.

The layered architecture of iOS is given:

Layers in Apple iOS Architecture

iOS is a layered architecture comprising 4 different layers:

1. Core OS

The Core OS layer holds the low-level features that most other technologies are built upon. It also interacts directly with the hardware. Most of the functionality provided by the three higher level layers are built upon the Core OS layer and its low-level features. The Core OS layer provides a handful of frameworks that your application can use directly, such as the Accelerate and the Security frameworks. These technologies include Core Bluetooth Framework, External Accessory Framework, Accelerate Framework, Security Service Framework, Local Authorisation Framework, etc.

2. Core Service Layer

This layer provides features such as block objects, Grand Central Dispatch, In-App Purchase, and iCloud Storage. Automatic Reference Counting (ARC) was introduced in this layer, which takes care of all the Memory Management. Core Services layer is also closely tied to the C-based Core Foundation-framework or Core Foundation.

3. Media Layer

A useful layer that provides multimedia services which you can use within your iPhone, and other iOS devices. The Media layer comprises Graphics, Audio, and video. This layer comprises Assets Library, Core Text, Core Graphics, OpenGL ES and OpenAL, AV Foundation and Core Media. This layer is responsible for any kinds of drawing, rendering 2D and 3D data, buffering video, Text layout, etc.

4. Cocoa Touch Layer

It is the topmost layer in the iOS architecture. This layer provides the abstraction of IOS, it is written in Objective–C. It is important, and it contains some key frameworks which are used by native applications. The UIKit framework is the most widely used. Foundation Kit Framework, MapKit, PushKit, EventKit are some other useful frameworks. It defines the basic application management and infrastructure, multitasking support, user interface management, multi-touch support, motion event, etc.


Conclusion

In this note series, we understood the different layers of Apple iOS architecture which is used in many of the apple mobile devices.

Thanks for reading! I hope you enjoyed and learned about Apple iOS architecture Concepts. Reading is one thing, but the only way to master it is to do it yourself.

Please follow and subscribe to the blog and support us in any way possible. Also like and share the article with others for spread valuable knowledge.

You can find Other articles of CoolmonkTechie as below link :

You can also follow other website and tutorials of iOS as below links :

If you have any comments, questions, or think I missed something, feel free to leave them below in the comment box.

Thanks again Reading. HAPPY READING !!???

A Short Note – React Terminology Cheatsheet

Hello Readers, CoolMonkTechie heartily welcomes you in A Short Note Series(React Terminology Cheatsheet).

In this note series, we will learn about the commonly used React Terminology and definitions. This article will explain some common terminology from ReactJS.

So, Let’s begin.

  • Single-page Application – An application that loads a single HTML page and all the necessary assets (such as Javascript and CSS) required for the application to run.
  • ES6,ES2015,ES2016 – Most recent versions of the ECMAScript Language Specification standard, which is the javascript language is an implementation of.
  • Compiler – A Javascript compiler takes JavaScript code, transforms it and returns JavaScript code in a different format.
  • Bundlers – Bundlers takes JavaScript and CSS code written as separate modules and compile them together into a few files better optimized for the browser.
  • Package Managers – Package Managers are tools that allow you to manage dependencies in your project.
  • CDN – CDN stands for Content Delivery Network. CDNs deliver cached, static content from a network of servers across the globe.
  • Elements – React elements are the building blocks of React applications. An elements describes what you want to see on the screen.React elements are immutable.
  • JSX – Allows us to write HTML like syntax which gets transformed to lightweight Javascript objects.
  • Virtual DOM – A Javascript representation of the actual DOM.
  • React.Component – The way in which you create a new component.
  • render method – Describes what the UI will look like for the particular component.
  • ReactDOM.render – Renders a React component to a DOM node.
  • State – The internal data store (Object) of a component.
  • constructor (this.state) – The way in which you establish the initial state of a component.
  • setState – A helper method used for updating the state of a component and re-rendering the UI.
  • props – The data which is passed to the child component from the parent component.
  • propTypes – Allow you to control the presence or types of certain props passed to the child component.
  • defaultProps – Allows you set default props for your component.
  • props.children – Available on every component. It contains the content between the opening and closing tags of a component.
  • Component Lifecycle
    • componentDidMount – Fired before the component mounted.
    • componentWillUnmount – Fired after the component will unmount.
    • getDerivedStateFromProps – This method fired when the component mounts and whenever the props change. Used to update the state of a component when its props change.
  • Events
    • onClick
    • onSubmit
    • onChange
  • Controlled Component – An input form element whose value is controlled by React
  • Uncontrolled Component – An uncontrolled component works like form elements do outside of React.

Conclusion

In this note series, We understood about the React Terminology Cheatsheet List.

Thanks for reading ! I hope you enjoyed and learned about React Terminology. Reading is one thing, but the only way to master it is to do it yourself.

Please follow and subscribe to the blog and support us in any way possible. Also like and share the article with others for spread valuable knowledge.

You can find Other articles of CoolmonkTechie as below link :

You can also follow official website and tutorials of React as below links :

If you have any comments, questions, or think I missed something, feel free to leave them below.

Thanks again Reading. HAPPY READING !!???

Exit mobile version