<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Manoranjan Jena on Medium]]></title>
        <description><![CDATA[Stories by Manoranjan Jena on Medium]]></description>
        <link>https://medium.com/@mjena?source=rss-598480f311d1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*fraq8zvNkLhTf0DI</url>
            <title>Stories by Manoranjan Jena on Medium</title>
            <link>https://medium.com/@mjena?source=rss-598480f311d1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 17:43:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mjena/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understanding Redux Toolkit]]></title>
            <link>https://medium.com/@mjena/understanding-redux-toolkit-6dde46d1658e?source=rss-598480f311d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/6dde46d1658e</guid>
            <category><![CDATA[redux-saga]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[redux-thunk]]></category>
            <category><![CDATA[redux-toolkit]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Manoranjan Jena]]></dc:creator>
            <pubDate>Sun, 04 Jun 2023 11:14:10 GMT</pubDate>
            <atom:updated>2023-06-04T11:14:10.101Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Comprehensive Guide to Simplify State Management</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AJpFZrofvxMn3MHh9p3i_Q.jpeg" /></figure><h3>Introduction:</h3><p>In modern web development, managing application state efficiently is crucial. Redux, a popular state management library for JavaScript applications, provides a reliable and predictable way to handle state. However, Redux can be complex to set up and maintain, requiring boilerplate code and multiple dependencies. That’s where Redux Toolkit comes to the rescue! Redux Toolkit is an official package from the Redux team that simplifies the Redux workflow, reduces boilerplate code, and improves developer productivity. In this blog post, we’ll delve into Redux Toolkit, exploring its key features and demonstrating how it streamlines state management.</p><h3>What is Redux Toolkit?</h3><p>Redux Toolkit is a library that provides a set of utilities and conventions for writing Redux logic. It combines several Redux packages, including Redux DevTools, Redux Thunk, and Redux-Immutable, to create a cohesive and opinionated approach to Redux development. Redux Toolkit aims to make Redux more accessible to beginners and improve productivity for experienced developers.</p><h3>Installing Redux Toolkit:</h3><p>To begin using Redux Toolkit, we need to install it as a dependency in our project. Open your terminal and navigate to your project directory. Then, run the following command:</p><pre>npm install @reduxjs/toolkit</pre><h4>Setting up the Redux Store:</h4><p>With Redux Toolkit, setting up the Redux store becomes much simpler. Let’s walk through the process step by step.</p><ol><li>Create a new file called store.js in your project&#39;s source directory.</li><li>Import the necessary dependencies:</li></ol><pre>import { configureStore } from &#39;@reduxjs/toolkit&#39;;</pre><p>3. Define your initial state and reducers:</p><pre>const initialState = {<br>  // Your initial state goes here<br>};<br><br>const reducer = (state = initialState, action) =&gt; {<br>  // Your reducers go here<br>};</pre><p>4. Configure the store:</p><pre>const store = configureStore({<br>  reducer: reducer<br>});<br><br>export default store;</pre><p>By using configureStore from Redux Toolkit, we simplify the store configuration. It automatically sets up Redux DevTools and enables various middleware, including thunk, by default.</p><h4>Using Redux Toolkit Slices:</h4><p>One of the powerful features of Redux Toolkit is the ability to define slices, which encapsulate related actions and reducers for a specific portion of the state. Let’s create a slice to manage a user entity.</p><ol><li>Create a new file called userSlice.js in your source directory.</li><li>Import the necessary dependencies:</li></ol><pre>import { createSlice } from &#39;@reduxjs/toolkit&#39;;</pre><p>3. Define the initial state and create a slice:</p><pre>const initialState = {<br>  user: null,<br>  loading: false,<br>  error: null<br>};<br><br>const userSlice = createSlice({<br>  name: &#39;user&#39;,<br>  initialState: initialState,<br>  reducers: {<br>    setUser: (state, action) =&gt; {<br>      state.user = action.payload;<br>    },<br>    setLoading: (state, action) =&gt; {<br>      state.loading = action.payload;<br>    },<br>    setError: (state, action) =&gt; {<br>      state.error = action.payload;<br>    }<br>  }<br>});<br><br>export const { setUser, setLoading, setError } = userSlice.actions;<br><br>export default userSlice.reducer;</pre><p>4. Add the user slice to your store:</p><pre>import { configureStore } from &#39;@reduxjs/toolkit&#39;;<br>import userReducer from &#39;./userSlice&#39;;<br><br>const store = configureStore({<br>  reducer: {<br>    user: userReducer<br>  }<br>});<br><br>export default store;</pre><p>With the user slice defined, we can dispatch actions like setUser, setLoading, and setError to update the user state.</p><h4>Using Redux Toolkit Selectors:</h4><p>Redux Toolkit also provides a convenient way to extract data from the Redux store using selectors. Let’s create a simple selector to retrieve the user state.</p><ol><li>Create a new file called selectors.js in your source directory.</li><li>Import the necessary dependencies:</li></ol><pre>import { createSelector } from &#39;@reduxjs/toolkit&#39;;</pre><p>3. Define the selector:</p><pre>const selectUser = (state) =&gt; state.user.user;<br><br>export const selectCurrentUser = createSelector(<br>  selectUser,<br>  (user) =&gt; user<br>);</pre><p>4. Utilize the selector in your components:</p><pre>import { useSelector } from &#39;react-redux&#39;;<br>import { selectCurrentUser } from &#39;./selectors&#39;;<br><br>const UserProfile = () =&gt; {<br>  const currentUser = useSelector(selectCurrentUser);<br><br>  // Render the user profile<br>};</pre><p>By using selectors, we can efficiently retrieve specific parts of the state, preventing unnecessary re-renders and improving performance.</p><h3>Conclusion:</h3><p>In this blog post, we explored Redux Toolkit, a powerful library that simplifies Redux state management. We learned how to set up the Redux store, define slices for managing state, and utilize selectors to extract data from the store. By leveraging Redux Toolkit, we can significantly reduce the boilerplate code and improve productivity in our Redux applications.</p><h3>References:</h3><ol><li>Redux Toolkit Documentation: <a href="https://redux-toolkit.js.org/">https://redux-toolkit.js.org/</a></li><li>Redux Documentation: <a href="https://redux.js.org/">https://redux.js.org/</a></li><li>React Redux Documentation: <a href="https://react-redux.js.org/">https://react-redux.js.org/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6dde46d1658e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demystifying Redux]]></title>
            <link>https://medium.com/@mjena/demystifying-redux-fee87743f776?source=rss-598480f311d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/fee87743f776</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[redux-toolkit]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[redux-thunk]]></category>
            <dc:creator><![CDATA[Manoranjan Jena]]></dc:creator>
            <pubDate>Sun, 04 Jun 2023 10:52:55 GMT</pubDate>
            <atom:updated>2023-06-04T10:52:55.510Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Comprehensive Guide to Understanding and Implementing Redux in Your JavaScript Applications</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*s9W4d0pn0rFexNJWBqUG8Q.png" /></figure><h3>Introduction:</h3><p>In today’s world of complex web applications, managing state efficiently is crucial for building robust and scalable codebases. Redux, a predictable state container for JavaScript applications, has gained significant popularity for its simplicity and effectiveness. In this blog post, we will delve into Redux, exploring its core principles, understanding its key components, and providing detailed explanations of its implementation. Whether you’re new to Redux or looking to deepen your understanding, this guide will help you unlock the power of Redux in your projects.</p><h3>Understanding Redux:</h3><p>Redux is a state management library that works seamlessly with frameworks like React, Angular, and Vue, providing a centralized store to manage application state. Its main objective is to enable predictable state management by enforcing a unidirectional data flow and immutable data patterns. This helps maintain a clear separation of concerns and simplifies debugging and testing.</p><h3>Key Concepts:</h3><ol><li><strong>Store</strong>: The store is the single source of truth in a Redux application. It holds the entire application state, and you can access and update it using predefined methods.</li><li><strong>Actions</strong>: Actions are plain JavaScript objects that describe the intention to modify the state. They carry the necessary data to update the store.</li><li><strong>Reducers</strong>: Reducers are pure functions responsible for transforming the current state and the dispatched action into a new state. They define how the application state should change based on the action type.</li><li><strong>Dispatch</strong>: Dispatch is the method used to send actions to the Redux store. It triggers the state update process.</li><li><strong>Subscribers</strong>: Subscribers are functions that listen to state changes in the Redux store. They are notified whenever the state is updated.</li></ol><h3>Implementing Redux Step by Step:</h3><h4>1. Installation:</h4><p>Begin by installing Redux in your project using npm or yarn:</p><pre>npm install redux</pre><h4>2. Setting up the Store:</h4><p>Create a store by importing createStore from Redux and passing a reducer function as an argument:</p><pre>import { createStore } from &#39;redux&#39;;<br><br>const initialState = {}; // Define your initial state here<br><br>function reducer(state = initialState, action) {<br>  // Implement your reducer logic here<br>}<br><br>const store = createStore(reducer);</pre><h4>3. Defining Actions:</h4><p>Declare action types as constants and create action creators, which are functions that return action objects. For example:</p><pre>const ADD_TODO = &#39;ADD_TODO&#39;;<br><br>function addTodo(title) {<br>  return {<br>    type: ADD_TODO,<br>    payload: {<br>      title,<br>    },<br>  };<br>}</pre><h4>4. Updating the Store:</h4><p>Use the dispatch method to send actions to the store. For example:</p><pre>store.dispatch(addTodo(&#39;Buy groceries&#39;));</pre><h4>5. Handling Actions with Reducers:</h4><p>Implement the logic in your reducer function to handle different action types and return a new state accordingly. For example:</p><pre>function reducer(state = initialState, action) {<br>  switch (action.type) {<br>    case ADD_TODO:<br>      return {<br>        ...state,<br>        todos: [...state.todos, action.payload],<br>      };<br>    default:<br>      return state;<br>  }<br>}</pre><h3>Conclusion:</h3><p>Redux offers a robust and scalable solution for state management in JavaScript applications. By following the principles of Redux and understanding its core components, you can effectively manage and update your application state with ease. This blog post provided a comprehensive overview of Redux, including its key concepts and step-by-step implementation guide. Feel free to explore the official Redux documentation <a href="https://chat.openai.com/#user-content-fn-1%5E">1</a> for further details and examples.</p><h3>Footnotes</h3><ol><li>Redux official documentation. Available at: <a href="https://redux.js.org/">https://redux.js.org</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fee87743f776" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TypeScript]]></title>
            <link>https://medium.com/@mjena/typescript-443db78c5e58?source=rss-598480f311d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/443db78c5e58</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[class]]></category>
            <category><![CDATA[interfaces]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Manoranjan Jena]]></dc:creator>
            <pubDate>Tue, 02 May 2023 07:18:55 GMT</pubDate>
            <atom:updated>2023-05-08T06:30:57.320Z</atom:updated>
            <content:encoded><![CDATA[<h4>Getting Started</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3noVWfmHSjR4dTP5.png" /></figure><p>TypeScript is a powerful programming language designed as a superset of JavaScript. Developed by Microsoft, TypeScript was first released in 2012 and has since become an increasingly popular choice among developers for building complex and scalable web applications. In this blog, we will explore the basics of TypeScript and how it can improve the development process.</p><h3>What is TypeScript?</h3><p>TypeScript is a statically-typed programming language that adds optional types to JavaScript. This means that we can specify the types of variables, function parameters, and function return values in our code. TypeScript then uses these types to catch errors at compile-time, before the code is actually run.</p><p>TypeScript also introduces other features not available in JavaScript, such as interfaces, classes, and decorators. These features make it easier to write large, complex applications by providing a way to organize code and define reusable components.</p><h3>Installing TypeScript</h3><p>Before we dive into writing TypeScript code, we need to install the TypeScript compiler. We can do this using npm, the package manager for Node.js. Open a terminal or command prompt and run the following command:</p><pre>npm install -g typescript</pre><p>This will install the TypeScript compiler globally on your system.</p><h3>Writing TypeScript</h3><p>Let’s start by creating a simple TypeScript file. Create a new file called hello.ts and add the following code:</p><pre>function sayHello(name: string) {<br>  console.log(`Hello, ${name}!`);<br>}<br><br>sayHello(&#39;TypeScript&#39;);</pre><p>In this example, we have defined a function called sayHello that takes a parameter called name of type string. We then call this function with the argument &#39;TypeScript&#39;. Notice that we did not have to specify the return type of the function, as TypeScript can infer it from the fact that we are calling console.log, which returns void.</p><p>To compile this file, we can run the following command in the terminal:</p><pre>tsc hello.ts</pre><p>This will generate a JavaScript file called hello.js that contains the same code, but with the type annotations removed:</p><pre>function sayHello(name) {<br>  console.log(`Hello, ${name}!`);<br>}<br><br>sayHello(&#39;TypeScript&#39;);</pre><h3>Using Interfaces</h3><p>One of the powerful features of TypeScript is the ability to define interfaces. An interface is a way to define a contract between different parts of your code, specifying what properties and methods an object should have.</p><p>Let’s create an interface for a person:</p><pre>interface Person {<br>  firstName: string;<br>  lastName: string;<br>  age: number;<br>}<br><br>function printPerson(person: Person) {<br>  console.log(`${person.firstName} ${person.lastName} (${person.age})`);<br>}<br><br>const john: Person = {<br>  firstName: &#39;John&#39;,<br>  lastName: &#39;Doe&#39;,<br>  age: 30,<br>};<br><br>printPerson(john);</pre><p>In this example, we define an interface called Person that has three properties: firstName, lastName, and age. We then define a function called printPerson that takes an argument of type Person and logs the person&#39;s name and age to the console.</p><p>We then create an object called john that conforms to the Person interface, and pass it to the printPerson function.</p><h3>Using Classes</h3><p>Another feature of TypeScript is the ability to define classes. Classes provide a way to define objects with properties and methods, and are a cornerstone of object-oriented programming.</p><p>Let’s create a simple class for a car:</p><pre>class Car {<br>  private make: string;<br>  private model: string;<br>  private year: number;<br><br>  constructor(make: string, model: string, year: number) {<br>    this.make = make;<br>    this.model = modelthis.year = year;<br>  }<br><br>  public getInfo(): string {<br>    return ${this.make} ${this.model} (${this.year});<br>  }<br>}<br><br>const myCar = new Car(&#39;Honda&#39;, &#39;Civic&#39;, 2020);<br>console.log(myCar.getInfo());</pre><p>In this example, we define a class called Car that has three private properties: make, model, and year. We then define a constructor that takes these properties as arguments and sets them on the object. We also define a public method called Info that returns a string with the car’s make, model, and year. We then create an instance of the Car class called myCar, passing in the make, model, and year as arguments to the constructor. We then call the getInfo method on myCar and log the result to the console.</p><h4>Conclusion</h4><p>In this blog, we have covered the basics of TypeScript, including how to install the compiler, how to write TypeScript code, and how to use interfaces and classes. TypeScript is a powerful language that can greatly improve the development process by catching errors at compile-time and providing additional features not available in JavaScript. If you’re interested in learning more about TypeScript, check out the official documentation and start experimenting with the language. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=443db78c5e58" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Social Media App]]></title>
            <link>https://medium.com/@mjena/social-media-app-144983f6d779?source=rss-598480f311d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/144983f6d779</guid>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[social-media-app]]></category>
            <dc:creator><![CDATA[Manoranjan Jena]]></dc:creator>
            <pubDate>Sun, 30 Apr 2023 15:24:51 GMT</pubDate>
            <atom:updated>2023-04-30T15:24:51.511Z</atom:updated>
            <content:encoded><![CDATA[<h4>Using React Native and Firebase</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fhm1nbOCRv1Vi7rpBMzIng.png" /></figure><h3>Introduction</h3><p>Firebase is a popular backend-as-a-service platform that provides many features that can be used to build modern mobile applications. In this tutorial, we will build a social media app using React Native and Firebase that allows users to sign up, sign in, and post messages to a public timeline.</p><h3>Prerequisites</h3><p>Before we begin, you’ll need to have the following installed on your computer:</p><ul><li>Node.js and npm</li><li>Android Studio or Xcode (depending on whether you want to run the app on an Android or iOS device)</li><li>A text editor or IDE of your choice (e.g. Visual Studio Code, Sublime Text, etc.)</li></ul><p>You’ll also need to create a Firebase project and obtain your project’s credentials. You can follow the official Firebase documentation for more information on how to create a Firebase project.</p><h3>Step 1: Create a new React Native project</h3><p>First, we need to create a new React Native project. Open your terminal or command prompt and navigate to the directory where you want to create the project. Then, run the following command:</p><pre>npx react-native init SocialMediaApp</pre><p>This will create a new React Native project named SocialMediaApp in the current directory.</p><h3>Step 2: Install required dependencies</h3><p>To build a social media app with Firebase, we need to install some dependencies that will allow us to connect to Firebase and authenticate users. Run the following command to install these dependencies:</p><pre>npm install firebase react-native-gifted-chat react-native-elements react-native-vector-icons</pre><ul><li>firebase is the Firebase SDK for JavaScript that we’ll use to connect to Firebase and interact with its services.</li><li>react-native-gifted-chat is a UI library that provides a chat interface that we’ll use to display messages in our app.</li><li>react-native-elements is a UI library that provides a set of customizable UI components that we’ll use to build our app’s interface.</li><li>react-native-vector-icons is a library that provides a set of vector icons that we’ll use to enhance our app’s UI.</li></ul><h3>Step 3: Set up Firebase</h3><p>Next, we need to set up Firebase in our React Native project. To do this, we need to create a new Firebase project and obtain our project’s credentials.</p><h3>Creating a Firebase project</h3><ol><li>Go to the <a href="https://console.firebase.google.com/">Firebase console</a> and click “Add project”.</li><li>Enter a name for your project and select your country/region.</li><li>Click “Create project”.</li></ol><h3>Obtaining your project’s credentials</h3><ol><li>Go to the “Project settings” page of your Firebase project.</li><li>Click the “Web” icon to add a web app to your project.</li><li>Enter a name for your app and click “Register app”.</li><li>Copy the values for “apiKey”, “authDomain”, “databaseURL”, “projectId”, “storageBucket”, and “messagingSenderId” from the Firebase config object and paste them into a new file called firebaseConfig.js in the root directory of your React Native project.</li></ol><p>Your firebaseConfig.js file should look like this:</p><pre>export default {<br>  apiKey: &quot;&lt;your-api-key&gt;&quot;,<br>  authDomain: &quot;&lt;your-auth-domain&gt;&quot;,<br>  databaseURL: &quot;&lt;your-database-url&gt;&quot;,<br>  projectId: &quot;&lt;your-project-id&gt;&quot;,<br>  storageBucket: &quot;&lt;your-storage-bucket&gt;&quot;,<br>  messagingSenderId: &quot;&lt;your-messaging-sender-id&gt;&quot;<br>};</pre><h3>Step 4: Create the authentication flow</h3><p>Now that Firebase is set up, we can create the authentication flow for our app. We’ll use Firebase Authentication to handle user authentication.</p><h3>Setting up Firebase</h3><ol><li>Import the necessary Firebase modules at the top of your App.js file:</li></ol><pre>import firebase from &quot;firebase&quot;;<br>import &quot;firebase/auth&quot;;</pre><p>2. Initialize Firebase by adding the following code at the beginning of your App component:</p><pre>componentDidMount() {<br> if (!firebase.apps.length) {<br> firebase.initializeApp(firebaseConfig);<br> }<br>}</pre><p>This code checks whether Firebase has already been initialized, and if not, initializes it using the firebaseConfig object that we defined earlier.</p><p>3. Add state variables to your App component to store the user’s email and password:</p><pre>state = {<br> email: &quot;&quot;,<br> password: &quot;&quot;,<br> user: null<br>};</pre><p>4. Create methods to handle user sign up, sign in, and sign out:</p><pre>handleSignUp = () =&gt; {<br> firebase<br> .auth()<br> .createUserWithEmailAndPassword(this.state.email, this.state.password)<br> .then(user =&gt; this.setState({ user }))<br> .catch(error =&gt; console.log(error));<br>};<br>handleSignIn = () =&gt; {<br> firebase<br> .auth()<br> .signInWithEmailAndPassword(this.state.email, this.state.password)<br> .then(user =&gt; this.setState({ user }))<br> .catch(error =&gt; console.log(error));<br>};<br>handleSignOut = () =&gt; {<br> firebase<br> .auth()<br> .signOut()<br> .then(() =&gt; this.setState({ user: null }))<br> .catch(error =&gt; console.log(error));<br>};</pre><p>These methods use the Firebase Authentication API to sign up, sign in, and sign out the user.</p><p>5. Add a form to your App component that allows the user to enter their email and password:</p><pre>&lt;View&gt;<br> &lt;TextInput<br>   style={styles.input}<br>   placeholder=&quot;Email&quot;<br>   onChangeText={email =&gt; this.setState({ email })}<br>   value={this.state.email}<br> /&gt;<br> &lt;TextInput<br>   style={styles.input}<br>   placeholder=&quot;Password&quot;<br>   onChangeText={password =&gt; this.setState({ password })}<br>   value={this.state.password}<br>   secureTextEntry<br> /&gt;<br> &lt;View style={styles.buttonContainer}&gt;<br>   &lt;Button title=&quot;Sign up&quot; onPress={this.handleSignUp} /&gt;<br>   &lt;Button title=&quot;Sign in&quot; onPress={this.handleSignIn} /&gt;<br> &lt;/View&gt;<br> {this.state.user &amp;&amp; (<br> &lt;View style={styles.buttonContainer}&gt;<br>   &lt;Button title=&quot;Sign out&quot; onPress={this.handleSignOut} /&gt;<br> &lt;/View&gt;<br> )}<br>&lt;/View&gt;</pre><p>This code renders two text input fields for the user to enter their email and password, and two buttons to sign up or sign in. If the user is signed in, a “Sign out” button is displayed.</p><h3>Step 5: Create the chat interface</h3><p>Now that the authentication flow is in place, we can create the chat interface using the react-native-gifted-chat library.</p><ol><li>Import the necessary modules at the top of your App.js file:</li></ol><pre>import { GiftedChat } from &quot;react-native-gifted-chat&quot;;<br>import uuid from &quot;uuid/v4&quot;;</pre><p>2. Add state variables to your App component to store the messages:</p><pre>state = {<br>  email: &quot;&quot;,<br>  password: &quot;&quot;,<br>  user: null,<br>  messages: []<br>};</pre><p>3. Create a method to load the initial messages from Firebase:</p><pre>loadMessages = () =&gt; {<br>  firebase<br>    .database()<br>    .ref(&quot;messages&quot;)<br>    .orderByChild(&quot;createdAt&quot;)<br>    .on(&quot;value&quot;, snapshot =&gt; {<br>      const messages = [];<br>      snapshot.forEach(child =&gt; {<br>        messages.push({<br>          _id: child.key,<br>          text: child.val().text,<br>          createdAt: child.val().createdAt,<br>      user: {<br>        _id: child.val().user._id,<br>        name: child.val().user.name<br>      }<br>    });<br>  });<br>  this.setState({ messages });<br>});<br>};</pre><p>This code listens for changes to the messages node in Firebase and updates the messages state variable accordingly.</p><p>4. Create a method to send messages to Firebase:</p><pre>handleSend = messages =&gt; {<br>  const newMessage = messages[0];<br>  firebase<br>    .database()<br>    .ref(&quot;messages&quot;)<br>    .push({<br>      _id: uuid(),<br>      text: newMessage.text,<br>      createdAt: newMessage.createdAt.getTime(),<br>      user: {<br>        _id: this.state.user.uid,<br>        name: this.state.user.displayName<br>      }<br>    });<br>};</pre><p>This code sends a new message to Firebase when the user types and sends a message in the chat interface.</p><p>5. Render the chat interface in your App component:</p><pre>&lt;GiftedChat<br>  messages={this.state.messages}<br>  onSend={this.handleSend}<br>  user={{<br>    _id: this.state.user &amp;&amp; this.state.user.uid,<br>    name: this.state.user &amp;&amp; this.state.user.displayName<br>  }}<br>/&gt;</pre><p>This code renders the chat interface using the GiftedChat component from the react-native-gifted-chat library. It passes in the messages state variable, the handleSend method to send messages to Firebase, and the current user&#39;s information.</p><h3>Conclusion</h3><p>In this tutorial, we have learned how to create a social media app using React Native and Firebase. We have covered the basics of Firebase authentication and database, and how to use the react-native-gifted-chat library to create a chat interface. By combining these technologies, we can create a real-time social media app with user authentication and chat functionality.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=144983f6d779" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Expense-Tracker App]]></title>
            <link>https://medium.com/@mjena/expense-tracker-app-15a643d078b4?source=rss-598480f311d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/15a643d078b4</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[expense-management]]></category>
            <category><![CDATA[app-development]]></category>
            <dc:creator><![CDATA[Manoranjan Jena]]></dc:creator>
            <pubDate>Thu, 27 Apr 2023 08:02:18 GMT</pubDate>
            <atom:updated>2023-04-27T08:02:18.783Z</atom:updated>
            <content:encoded><![CDATA[<h4>Using React Native</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*wu2vbWELC1AKGaXJAAbTGQ.jpeg" /></figure><p>Are you looking for a way to keep track of your expenses? If so, then you might want to consider creating an expense tracker app. With an expense tracker app, you can easily monitor your spending habits and make better financial decisions.</p><p>In this tutorial, we will be using React Native to create an expense tracker app that can be used on both iOS and Android devices.</p><h3>Prerequisites</h3><p>Before we get started, you’ll need to make sure you have the following installed on your computer:</p><ul><li>Node.js</li><li>React Native CLI</li><li>An Android or iOS simulator</li></ul><h3>Step 1: Creating a New Project</h3><p>To create a new React Native project, open your terminal and navigate to the directory where you want to create your project. Then run the following command:</p><pre>npx react-native init ExpenseTrackerApp</pre><p>This will create a new project called “ExpenseTrackerApp” in the directory you specified.</p><h3>Step 2: Setting Up the Navigation</h3><p>Next, we need to set up the navigation for our app. We’ll be using React Navigation to handle our navigation. To install React Navigation, run the following command:</p><pre>npm install @react-navigation/native</pre><p>Then, install the dependencies for React Navigation by running the following command:</p><pre>npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view</pre><p>Next, we need to install the Stack Navigator, which will allow us to navigate between screens. To install the Stack Navigator, run the following command:</p><pre>npm install @react-navigation/stack</pre><p>Now that we have React Navigation installed, let’s set up our navigation. Open up the App.js file and add the following code:</p><pre>import React from &#39;react&#39;;<br>import { NavigationContainer } from &#39;@react-navigation/native&#39;;<br>import { createStackNavigator } from &#39;@react-navigation/stack&#39;;<br><br>import HomeScreen from &#39;./src/screens/HomeScreen&#39;;<br>import AddExpenseScreen from &#39;./src/screens/AddExpenseScreen&#39;;<br><br>const Stack = createStackNavigator();<br><br>const App = () =&gt; {<br>  return (<br>    &lt;NavigationContainer&gt;<br>      &lt;Stack.Navigator initialRouteName=&quot;Home&quot;&gt;<br>        &lt;Stack.Screen name=&quot;Home&quot; component={HomeScreen} /&gt;<br>        &lt;Stack.Screen name=&quot;AddExpense&quot; component={AddExpenseScreen} /&gt;<br>      &lt;/Stack.Navigator&gt;<br>    &lt;/NavigationContainer&gt;<br>  );<br>};<br><br>export default App;</pre><p>In this code, we’re importing the necessary components from React Navigation, as well as our two screens, HomeScreen and AddExpenseScreen. We&#39;re also creating a new Stack Navigator with two screens, Home and AddExpense.</p><h3>Step 3: Creating the Home Screen</h3><p>Now that our navigation is set up, let’s create our first screen. Create a new file in the src/screens directory called HomeScreen.js. In this file, we&#39;ll create a basic screen that displays some text.</p><pre>import React from &#39;react&#39;;<br>import { View, Text, StyleSheet } from &#39;react-native&#39;;<br><br>const HomeScreen = () =&gt; {<br>  return (<br>    &lt;View style={styles.container}&gt;<br>      &lt;Text&gt;Home Screen&lt;/Text&gt;<br>    &lt;/View&gt;<br>  );<br>};<br><br>const styles = StyleSheet.create({<br>  container: {<br>    flex: 1,<br>    alignItems: &#39;center&#39;,<br>    justifyContent: &#39;center&#39;,<br>  },<br>});<br><br>export default HomeScreen;</pre><p>n this code, we’re creating a simple screen with a View that has a Text component that displays &quot;Home Screen&quot;. We&#39;re also using a stylesheet to center the text.</p><h3>Step 4: Creating the Add Expense Screen</h3><p>Next, let’s create the screen where the user can add an expense. Create a new file in the src/screens directory called AddExpenseScreen.js. In this file, we&#39;ll create a form that allows the user to enter the details of their expense.</p><pre>import React, { useState } from &#39;react&#39;;<br>import { View, Text, TextInput, TouchableOpacity, StyleSheet } from &#39;react-native&#39;;<br><br>const AddExpenseScreen = () =&gt; {<br>  const [description, setDescription] = useState(&#39;&#39;);<br>  const [amount, setAmount] = useState(&#39;&#39;);<br><br>  const handleSave = () =&gt; {<br>    // code to save expense<br>  };<br><br>  return (<br>    &lt;View style={styles.container}&gt;<br>      &lt;Text style={styles.label}&gt;Description:&lt;/Text&gt;<br>      &lt;TextInput<br>        style={styles.input}<br>        onChangeText={setDescription}<br>        value={description}<br>      /&gt;<br>      &lt;Text style={styles.label}&gt;Amount:&lt;/Text&gt;<br>      &lt;TextInput<br>        style={styles.input}<br>        onChangeText={setAmount}<br>        value={amount}<br>        keyboardType=&quot;numeric&quot;<br>      /&gt;<br>      &lt;TouchableOpacity style={styles.button} onPress={handleSave}&gt;<br>        &lt;Text style={styles.buttonText}&gt;Save&lt;/Text&gt;<br>      &lt;/TouchableOpacity&gt;<br>    &lt;/View&gt;<br>  );<br>};<br><br>const styles = StyleSheet.create({<br>  container: {<br>    flex: 1,<br>    padding: 20,<br>  },<br>  label: {<br>    fontSize: 18,<br>    fontWeight: &#39;bold&#39;,<br>    marginTop: 20,<br>  },<br>  input: {<br>    borderWidth: 1,<br>    borderColor: &#39;#ccc&#39;,<br>    borderRadius: 4,<br>    padding: 10,<br>    marginTop: 10,<br>    marginBottom: 20,<br>  },<br>  button: {<br>    backgroundColor: &#39;#2196F3&#39;,<br>    padding: 10,<br>    borderRadius: 4,<br>    alignItems: &#39;center&#39;,<br>  },<br>  buttonText: {<br>    color: &#39;#fff&#39;,<br>    fontWeight: &#39;bold&#39;,<br>  },<br>});<br><br>export default AddExpenseScreen;</pre><p>In this code, we’re using the useState hook to keep track of the description and amount of the expense. We&#39;re also creating a form with two TextInput components for the description and amount, as well as a TouchableOpacity button to save the expense.</p><h3>Step 5: Adding Navigation Buttons</h3><p>Now that we have our screens set up, let’s add some navigation buttons to our HomeScreen. Open up the HomeScreen.js file and add the following code:</p><pre>import React from &#39;react&#39;;<br>import { View, Text, TouchableOpacity, StyleSheet } from &#39;react-native&#39;;<br><br>const HomeScreen = ({ navigation }) =&gt; {<br>  const handleAddExpense = () =&gt; {<br>    navigation.navigate(&#39;AddExpense&#39;);<br>  };<br><br>  return (<br>    &lt;View style={styles.container}&gt;<br>      &lt;Text&gt;Home Screen&lt;/Text&gt;<br>      &lt;TouchableOpacity style={styles.button} onPress={handleAddExpense}&gt;<br>        &lt;Text style={styles.buttonText}&gt;Add Expense&lt;/Text&gt;<br>      &lt;/TouchableOpacity&gt;<br>    &lt;/View&gt;<br>  );<br>};<br><br>const styles = StyleSheet.create({<br>  container: {<br>    flex: 1,<br>    alignItems: &#39;center&#39;,<br>    justifyContent: &#39;center&#39;,<br>  },<br>  button: {<br>    backgroundColor: &#39;#2196F3&#39;,<br>    padding: 10,<br>    borderRadius: 4,<br>    alignItems: &#39;center&#39;,<br>    marginTop: 20,<br>  },<br>  buttonText: {<br>    color: &#39;#fff&#39;,<br>    fontWeight: &#39;bold&#39;,<br>  },<br>});<br><br>export default HomeScreen;</pre><p>In this code, we’re adding a TouchableOpacity button that, when pressed, will navigate to the AddExpenseScreen.</p><h3>Step 6: Saving Expenses</h3><p>Now that we have our screens and navigation set up, let’s add the functionality to save expenses. In the AddExpenseScreen.js file, we&#39;ll add the following code to save the expense.</p><pre>import React, { useState } from &#39;react&#39;;<br>import { View, Text, TextInput, TouchableOpacity, StyleSheet } from &#39;react-native&#39;;<br><br>const AddExpenseScreen = ({ navigation, route }) =&gt; {<br>  const [description, setDescription] = useState(&#39;&#39;);<br>  const [amount, setAmount] = useState(&#39;&#39;);<br><br>  const handleSave = () =&gt; {<br>    const expense = {<br>      description,<br>      amount: parseFloat(amount),<br>      date: new Date(),<br>    };<br><br>    // save the expense to some data store<br>    // ...<br><br>    // navigate back to the home screen<br>    navigation.goBack();<br>  };<br><br>  return (<br>    &lt;View style={styles.container}&gt;<br>      &lt;Text style={styles.label}&gt;Description:&lt;/Text&gt;<br>      &lt;TextInput<br>        style={styles.input}<br>        onChangeText={setDescription}<br>        value={description}<br>      /&gt;<br>      &lt;Text style={styles.label}&gt;Amount:&lt;/Text&gt;<br>      &lt;TextInput<br>        style={styles.input}<br>        onChangeText={setAmount}<br>        value={amount}<br>        keyboardType=&quot;numeric&quot;<br>      /&gt;<br>      &lt;TouchableOpacity style={styles.button} onPress={handleSave}&gt;<br>        &lt;Text style={styles.buttonText}&gt;Save&lt;/Text&gt;<br>      &lt;/TouchableOpacity&gt;<br>    &lt;/View&gt;<br>  );<br>};<br><br>const styles = StyleSheet.create({<br>  container: {<br>    flex: 1,<br>    padding: 20,<br>  },<br>  label: {<br>    fontSize: 18,<br>    fontWeight: &#39;bold&#39;,<br>    marginTop: 20,<br>  },<br>  input: {<br>    borderWidth: 1,<br>    borderColor: &#39;#ccc&#39;,<br>    borderRadius: 4,<br>    padding: 10,<br>    marginTop: 10,<br>    marginBottom: 20,<br>  },<br>  button: {<br>    backgroundColor: &#39;#2196F3&#39;,<br>    padding: 10,<br>    borderRadius: 4,<br>    alignItems: &#39;center&#39;,<br>  },<br>  buttonText: {<br>    color: &#39;#fff&#39;,<br>    fontWeight: &#39;bold&#39;,<br>  },<br>});<br><br>export default AddExpenseScreen;</pre><p>In this code, we’re creating an expense object with the description, amount, and current date, and then saving it to some data store. We’re also navigating back to the home screen after the expense is saved.</p><h3>Step 7: Displaying Expenses</h3><p>Now that we can save expenses, let’s display them on the home screen. In the HomeScreen.js file, we&#39;ll add the following code:</p><pre>import React, { useState, useEffect } from &#39;react&#39;;<br>import { View, Text, TouchableOpacity, FlatList, StyleSheet } from &#39;react-native&#39;;<br><br>const HomeScreen = ({ navigation }) =&gt; {<br>  const [expenses, setExpenses] = useState([]);<br><br>  useEffect(() =&gt; {<br>    // fetch expenses from data store<br>    const fetchedExpenses = [<br>      { description: &#39;Groceries&#39;, amount: 50.23, date: new Date(2022, 3, 25) },<br>      { description: &#39;Gas&#39;, amount: 30.12, date: new Date(2022, 3, 24) },<br>      { description: &#39;Dinner&#39;, amount: 80.45, date: new Date(2022, 3, 23) },<br>    ];<br><br>    setExpenses(fetchedExpenses);<br>  }, []);<br><br>  const handleAddExpense = () =&gt; {<br>    navigation.navigate(&#39;AddExpense&#39;);<br>  };<br><br>  const renderItem = ({ item }) =&gt; (<br>    &lt;View style={styles.item}&gt;<br>      &lt;Text style={styles.description}&gt;{item.description}&lt;/Text&gt;<br>      &lt;Text style={styles.amount}&gt;${item.amount.toFixed(2)}&lt;/Text&gt;<br>      &lt;Text style={styles.date}&gt;{item.date.toLocaleDateString()}&lt;/Text&gt;<br>    &lt;/View&gt;<br>  );<br><br>  return (<br>    &lt;View style={styles.container}&gt;<br>      &lt;TouchableOpacity style={styles.button} onPress={handleAddExpense}&gt;<br>        &lt;Text style={styles.buttonText}&gt;Add Expense&lt;/Text&gt;<br>      &lt;/TouchableOpacity&gt;<br>      &lt;FlatList<br>        data={expenses}<br>        keyExtractor={(item, index) =&gt; index.toString()}<br>        renderItem={renderItem}<br>      /&gt;<br>    &lt;/View&gt;<br>    );<br>};<br><br>const styles = StyleSheet.create({<br>  container: {<br>    flex: 1,<br>    padding: 20,<br>    },<br>  button: {<br>    backgroundColor: &#39;#2196F3&#39;,<br>    padding: 10,<br>    borderRadius: 4,<br>    alignItems: &#39;center&#39;,<br>    marginBottom: 20,<br>  },<br>  buttonText: {<br>    color: &#39;#fff&#39;,<br>    fontWeight: &#39;bold&#39;,<br>  },<br>  item: {<br>    borderBottomWidth: 1,<br>    borderBottomColor: &#39;#ccc&#39;,<br>    paddingBottom: 10,<br>    marginBottom: 10,<br>  },<br>  description: {<br>    fontSize: 16,<br>    fontWeight: &#39;bold&#39;,<br>  },<br>  amount: {<br>    fontSize: 14,<br>  },<br>  date: {<br>    fontSize: 12,<br>    color: &#39;#aaa&#39;,<br>  },<br>});<br><br>export default HomeScreen;</pre><p>In this code, we’re using the FlatList component to display a list of expenses. We’re also adding a button to navigate to the AddExpenseScreen</p><h3>Conclusion</h3><p>In this tutorial, we’ve created a simple expense tracker app using React Native. We’ve covered the basics of React Native, including components, state, and navigation. We’ve also used a simple data store to save and fetch expenses.</p><p>This app is just a starting point. There are many ways to extend and improve it. For example, you could add authentication, a more sophisticated data store, or charts and graphs to visualize expenses over time. I encourage you to experiment and build on this app to learn more about React Native and mobile app development.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15a643d078b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Weather prediction App in React Native]]></title>
            <link>https://medium.com/@mjena/weather-prediction-app-in-react-native-e1d56ed70000?source=rss-598480f311d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1d56ed70000</guid>
            <category><![CDATA[weather]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[react-native-development]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Manoranjan Jena]]></dc:creator>
            <pubDate>Mon, 17 Apr 2023 07:43:57 GMT</pubDate>
            <atom:updated>2023-04-17T07:43:57.872Z</atom:updated>
            <content:encoded><![CDATA[<h4>Follow-along Tutorial</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*7knebSR7kE8ihyGDqpw0dA.jpeg" /></figure><p>React Native is a popular JavaScript framework that allows developers to build mobile applications for both iOS and Android platforms. In this tutorial, we will be building a simple weather prediction app using React Native.</p><p>To create our weather app, we will be using the <strong>OpenWeatherMap API</strong> to retrieve weather information based on the user’s current location. We will also be using several external libraries, such as axios, react-native-geolocation-service, moment, react-native-vector-icons, and react-native-linear-gradient.</p><h3>Prerequisites</h3><p>To follow along with this tutorial, you will need to have the following installed on your system:</p><ul><li>Node.js (version 12 or higher)</li><li>NPM (version 6 or higher)</li><li>React Native CLI (version 0.63.4 or higher)</li></ul><h4>Setting up the project</h4><p>To create a new React Native project, we can use the following command:</p><pre>npx react-native init WeatherApp</pre><p>Once the project is created, we can navigate into the project directory and start the Metro bundler and the React Native app using the following commands:</p><pre>cd WeatherApp<br>npm start</pre><p>To run the app on a physical device or emulator, we can use the following command:</p><pre>npx react-native run-android</pre><p>or</p><pre>npx react-native run-ios</pre><h4>Installing external libraries</h4><p>To install the external libraries that we will be using in our app, we can use the following commands:</p><pre>npm install axios react-native-geolocation-service moment react-native-vector-icons react-native-linear-gradient</pre><h4>Creating the WeatherScreen component</h4><p>To create the WeatherScreen component, we can create a new file called WeatherScreen.js inside the src/screens directory. In this file, we can define a functional component that will display the weather information.</p><p>Using the WeatherScreen component To use the WeatherScreen component in our app, we can modify the App.js file to include the component. We can replace the default Appcomponent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*nh_sk246AdvGAPvjQJ9jjg.jpeg" /></figure><h3>Follow-along:</h3><p>Let’s go through the code and understand how the app works.</p><h4>Using external libraries</h4><p>We import several external libraries at the top of the file:</p><pre>import axios from &quot;axios&quot;;<br>import Geolocation from &quot;react-native-geolocation-service&quot;;<br>import moment from &quot;moment&quot;;<br>import Icon from &quot;react-native-vector-icons/FontAwesome&quot;;<br>import LinearGradient from &quot;react-native-linear-gradient&quot;;</pre><ul><li>axios: A library for making HTTP requests.</li><li>react-native-geolocation-service: A library for accessing the device’s GPS sensor.</li><li>moment: A library for formatting dates.</li><li>react-native-vector-icons: A library for using vector icons.</li><li>react-native-linear-gradient: A library for creating linear gradients.</li></ul><h4>Defining state variables</h4><p>We define two state variables using the useState hook:</p><pre>const [location, setLocation] = useState(null);<br>const [weather, setWeather] = useState(null);</pre><ul><li>location: The current location of the user.</li><li>weather: The current weather information for the user’s location.</li></ul><h4>Retrieving the user’s location</h4><p>We use the useEffect hook to retrieve the user&#39;s location when the component is mounted:</p><pre>useEffect(() =&gt; {<br>  Geolocation.getCurrentPosition(<br>    (position) =&gt; {<br>      setLocation(position.coords);<br>    },<br>    (error) =&gt; {<br>      console.log(error.code, error.message);<br>    },<br>    {<br>      enableHighAccuracy: true,<br>      timeout: 15000,<br>      maximumAge: 10000,<br>    } <br>  );<br>}, <br>[]);</pre><p>We use the getCurrentPosition method provided by the react-native-geolocation-service library to retrieve the current position of the user. The first parameter is a success callback that receives a position object containing the latitude and longitude coordinates of the user’s location. We set the location state variable to the coordinates of the user’s location. The second parameter is an error callback that logs any errors that occur while retrieving the user’s location.</p><h4>Retrieving weather information</h4><p>Once we have the user’s location, we use the useEffect hook to retrieve weather information for that location:</p><pre>useEffect(() =&gt; {<br>  if (location) {<br>    const { latitude, longitude } = location;<br><br>    const API_KEY = &quot;&lt;API_KEY&gt;&quot;;<br>    const API_URL = `https://api.openweathermap.org/data/2.5/weather?lat=${latitude}&amp;lon=${longitude}&amp;units=metric&amp;appid=${API_KEY}`;<br><br>    axios<br>      .get(API_URL)<br>      .then((response) =&gt; {<br>        setWeather(response.data);<br>      })<br>      .catch((error) =&gt; {<br>        console.log(error);<br>      });<br>  }<br>}, [location]);</pre><p>We check if the location state variable is not null. If it is not null, we extract the latitude and longitude coordinates from the location object.</p><p>We then create a URL for the OpenWeatherMap API using the latitude and longitude coordinates and our API key. We use the axios library to make a GET request to the API URL. If the request is successful, we set the weather state variable to the response data.</p><h4>Rendering the weather information</h4><p>Finally, we render the weather information in the WeatherScreen component:</p><pre>return (<br>  &lt;LinearGradient<br>    colors={[&quot;#4c669f&quot;, &quot;#3b5998&quot;, &quot;#192f6a&quot;]}<br>    style={styles.container}<br>  &gt;<br>    {weather ? (<br>      &lt;&gt;<br>        &lt;View style={styles.header}&gt;<br>          &lt;View style={styles.location}&gt;<br>            &lt;Icon name=&quot;map-marker&quot; style={styles.locationIcon} /&gt;<br>            &lt;Text style={styles.locationText}&gt;{city}&lt;/Text&gt;<br>          &lt;/View&gt;<br>          &lt;Text style={styles.date}&gt;{date}&lt;/Text&gt;<br>        &lt;/View&gt;<br>        &lt;View style={styles.weather}&gt;<br>          &lt;Image source={{ uri: iconUrl }} style={styles.icon} /&gt;<br>          &lt;Text style={styles.temperature}&gt;{temperature}&amp;deg;C&lt;/Text&gt;<br>          &lt;Text style={styles.description}&gt;<br>            {weather.weather[0].description}<br>          &lt;/Text&gt;<br>        &lt;/View&gt;<br>      &lt;/&gt;<br>    ) : (<br>      &lt;Text style={styles.loading}&gt;Loading...&lt;/Text&gt;<br>    )}<br>  &lt;/LinearGradient&gt;<br>);</pre><p>We use the LinearGradient component from the react-native-linear-gradient library to create a gradient background for the screen.</p><p>If we have weather information (weather is not null), we render the weather information using the city, date, iconUrl, temperature, and weather state variables.</p><p>If we do not have weather information (weather is null), we render a &quot;Loading...&quot; text.</p><h3>Conclusion</h3><p>In this tutorial, we have learned how to create a weather prediction app using React Native. We have covered how to use third-party libraries like axios, moment, and react-native-vector-icons to simplify the process of making API requests and styling our app.</p><p>We have also explored how to use the useState and useEffect hooks to manage our app&#39;s state and perform side effects like retrieving data from an API.</p><p>By following the steps in this tutorial, you should have a solid understanding of how to build a simple app using React Native. From here, you can continue to explore the many other features and capabilities of this powerful framework, and begin to create your own unique and innovative apps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1d56ed70000" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with React Native]]></title>
            <link>https://medium.com/@mjena/getting-started-with-react-native-3d0bd7d4c848?source=rss-598480f311d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d0bd7d4c848</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[cross-platform]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[react-native-development]]></category>
            <dc:creator><![CDATA[Manoranjan Jena]]></dc:creator>
            <pubDate>Thu, 13 Apr 2023 09:24:52 GMT</pubDate>
            <atom:updated>2023-04-13T09:24:52.737Z</atom:updated>
            <content:encoded><![CDATA[<h4>A comprehensive guide</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TSZpWhHAxe-PtxJ49iUsGQ.png" /></figure><h4>Introduction</h4><p>In today’s world, mobile applications have become an essential part of our daily lives. With the rise of smartphones, people are increasingly relying on mobile applications for everything from communication and entertainment to productivity and e-commerce. As a result, the demand for mobile app development has skyrocketed, and developers are constantly looking for new ways to build efficient, high-quality mobile applications.</p><p>React Native is an open-source framework that allows developers to build native mobile applications using JavaScript and React. React Native was developed by Facebook and has quickly become one of the most popular frameworks for building mobile applications. In this article, we will explore the basics of React Native and its key features.</p><h4>What is React Native?</h4><p>React Native is a framework for building native mobile applications using JavaScript and React. It is an extension of the popular React library that was originally used to build web applications. React Native allows developers to write code once and deploy it on both iOS and Android platforms, saving developers a significant amount of time and effort.</p><p>React Native uses a similar syntax to React, making it easy for developers to learn and use. React Native provides a set of pre-built components that can be used to create complex and interactive user interfaces. These components include text, image, input fields, buttons, and more.</p><h4>Key Features of React Native</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*9XouBlI9EJgwtOqDP03nWA.png" /></figure><ol><li><strong>Cross-Platform Compatibility: </strong>One of the most significant advantages of React Native is its cross-platform compatibility. React Native allows developers to write code once and deploy it on both iOS and Android platforms. This feature saves developers a significant amount of time and effort since they do not have to write separate code for each platform.</li><li><strong>Hot Reloading:</strong> Hot reloading is a feature that allows developers to see changes in the application in real-time. This feature makes it easy for developers to test and debug their applications since they can see changes instantly.</li><li><strong>Component-Based Architecture:</strong> React Native uses a component-based architecture that makes it easy for developers to create reusable components. These components can be used across different applications, making it easier to maintain and manage the codebase.</li><li><strong>Third-Party Library Support:</strong> React Native has a vast collection of third-party libraries and plugins that can be used to add additional functionality to the application. These libraries can help developers save time and effort by providing pre-built components and functionality.</li><li><strong>Performance:</strong> React Native is known for its fast performance and efficient use of system resources. It uses native components, making it faster than hybrid frameworks that rely on webviews.</li></ol><h4>Getting Started with React Native</h4><p>To get started with React Native, you need to have a basic understanding of JavaScript and React. Once you have this, you can follow these steps to get started with React Native:</p><p><strong>Step 1: Install Node.js and npm</strong></p><p>Node.js and npm are required to install and manage React Native. You can download and install Node.js from the official website.</p><p><strong>Step 2: Install React Native CLI</strong></p><p>React Native CLI is a command-line interface that allows you to create, build, and run React Native applications. To install React Native CLI, open a terminal window and run the following command:</p><pre>npm install -g react-native-cli</pre><p><strong>Step 3: Create a new React Native project</strong></p><p>To create a new React Native project, run the following command in the terminal:</p><pre>react-native init myproject</pre><p>This command will create a new project called “myproject” in the current directory.</p><p><strong>Step 4: Run the project</strong></p><p>To run the project, navigate to the project directory and run the following command:</p><pre>react-native run-ios</pre><p>or</p><pre>react-native run-android</pre><p>This command will launch the project in the iOS or Android emulator.</p><h4>Conclusion</h4><p>React Native is a powerful and flexible framework that allows developers to build high-quality, native mobile applications using JavaScript and React. Its cross-platform compatibility, hot reloading, component-based architecture, and performance make it a popular choice among developers. With React Native, developers can write code once and deploy it on both iOS and Android platforms, saving a significant amount of time and effort.</p><p>In this article, we explored the basics of React Native and its key features. We also provided a step-by-step guide on how to get started with React Native. With React Native, developers can create efficient, high-quality mobile applications that can help them stand out in the competitive mobile app market. If you’re a developer looking to build mobile applications, React Native is definitely a framework worth considering.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d0bd7d4c848" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Advanced JavaScript Features]]></title>
            <link>https://medium.com/@mjena/exploring-advanced-javascript-features-2dbdb94dbffd?source=rss-598480f311d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/2dbdb94dbffd</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[promises]]></category>
            <category><![CDATA[js]]></category>
            <category><![CDATA[closures-functions]]></category>
            <category><![CDATA[async]]></category>
            <dc:creator><![CDATA[Manoranjan Jena]]></dc:creator>
            <pubDate>Mon, 03 Apr 2023 11:41:47 GMT</pubDate>
            <atom:updated>2023-04-03T11:41:47.595Z</atom:updated>
            <content:encoded><![CDATA[<h4>Closures, Prototypal Inheritance, Promises, Async/Await, and Destructuring</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*3p2C4ud_m1XHZtP7VEdUew.png" /></figure><p>JavaScript is a versatile language that can be used for both client-side and server-side scripting. It has evolved over the years to become one of the most popular programming languages in the world. Advanced JavaScript is all about using the language’s more advanced features to build powerful applications. In this blog post, we’ll explore some of these features and give examples of how to use them.</p><h4>Closures</h4><p>Closures are an essential concept in advanced JavaScript. They allow you to define a function inside another function and access the outer function’s variables. This is useful when you want to create private variables that are inaccessible to the outside world. Here’s an example:</p><pre>function outerFunction() {<br>  var privateVariable = &quot;I am private&quot;;<br>  <br>  function innerFunction() {<br>    console.log(privateVariable);<br>  }<br>  <br>  return innerFunction;<br>}<br><br>var innerFunc = outerFunction();<br>innerFunc(); // Output: &quot;I am private&quot;</pre><p>In this example, outerFunction creates a private variable privateVariable and a nested function innerFunction. outerFunction then returns innerFunction. When we call outerFunction, it returns innerFunction, and we store it in a variable called innerFunc. When we call innerFunc, it logs the value of privateVariable, which is &quot;I am private&quot;. This is possible because of closures, which allow innerFunction to access the variables of its parent function, outerFunction.</p><h4>Prototypal Inheritance</h4><p>JavaScript is a prototype-based language, which means that objects can inherit properties from other objects. Prototypal inheritance allows you to create new objects based on existing ones, which can save you a lot of time and effort. Here’s an example:</p><pre>function Person(firstName, lastName) {<br>  this.firstName = firstName;<br>  this.lastName = lastName;<br>}<br><br>Person.prototype.getFullName = function() {<br>  return this.firstName + &quot; &quot; + this.lastName;<br>};<br><br>var person = new Person(&quot;John&quot;, &quot;Doe&quot;);<br>console.log(person.getFullName()); // Output: &quot;John Doe&quot;</pre><p>In this example, we create a constructor function called Person, which takes two parameters, firstName and lastName. We then add a method called getFullName to the Person prototype. This method returns the person&#39;s full name by concatenating their first and last name. Finally, we create a new Person object called person and log its full name to the console. Note that person inherits the getFullName method from its prototype, which is why we can call it on the person object.</p><h4>Promises</h4><p>Promises are a powerful feature in advanced JavaScript that allow you to handle asynchronous operations in a more structured way. A promise represents the eventual completion (or failure) of an asynchronous operation and allows you to attach callbacks to it. Here’s an example:</p><pre>function getData() {<br>  return new Promise(function(resolve, reject) {<br>    setTimeout(function() {<br>      resolve(&quot;Data has been retrieved successfully!&quot;);<br>    }, 2000);<br>  });<br>}<br><br>getData()<br>  .then(function(data) {<br>    console.log(data);<br>  })<br>  .catch(function(error) {<br>    console.log(error);<br>  });</pre><p>In this example, we create a function called getData that returns a new promise. Inside the promise, we use setTimeout to simulate an asynchronous operation that takes two seconds to complete. When the operation is complete, we call resolve with a message indicating that the data has been retrieved successfully. We then call getData and attach two callbacks to it using the then and catch methods.</p><p>The then method is called when the promise is resolved, and it receives the resolved value as its argument. In this case, the resolved value is the message we passed to resolve, which is &quot;Data has been retrieved successfully!&quot;. We log this message to the console. The catch method is called when the promise is rejected, and it receives the rejection reason as its argument. We&#39;re not using the reject method in this example, so the catch method won&#39;t be called.</p><h4>Async/Await</h4><p>Async/await is a more recent addition to JavaScript that makes it even easier to work with promises. Async functions are functions that return promises, and they allow you to use the await keyword to wait for a promise to be resolved before continuing with the rest of the code. Here&#39;s an example:</p><pre>function getData() {<br>  return new Promise(function(resolve, reject) {<br>    setTimeout(function() {<br>      resolve(&quot;Data has been retrieved successfully!&quot;);<br>    }, 2000);<br>  });<br>}<br><br>async function printData() {<br>  try {<br>    const data = await getData();<br>    console.log(data);<br>  } catch (error) {<br>    console.log(error);<br>  }<br>}<br><br>printData();</pre><p>In this example, we create a function called printData that is marked as async. Inside the function, we call getData using the await keyword, which means that the function will wait for the promise to be resolved before continuing with the rest of the code. We then log the resolved value to the console. Note that we&#39;re using a try/catch block to handle any errors that might occur.</p><h4>Destructuring</h4><p>Destructuring is a powerful feature in JavaScript that allows you to extract values from arrays or objects and assign them to variables. This can save you a lot of time and effort when working with complex data structures. Here’s an example:</p><pre>const person = {<br>  firstName: &quot;John&quot;,<br>  lastName: &quot;Doe&quot;,<br>  age: 30,<br>  address: {<br>    street: &quot;123 Main St&quot;,<br>    city: &quot;Anytown&quot;,<br>    state: &quot;CA&quot;,<br>    zip: &quot;12345&quot;<br>  }<br>};<br><br>const { firstName, lastName, address: { city } } = person;<br><br>console.log(firstName); // Output: &quot;John&quot;<br>console.log(lastName); // Output: &quot;Doe&quot;<br>console.log(city); // Output: &quot;Anytown&quot;</pre><p>In this example, we create an object called person with several properties, including an address object. We then use destructuring to extract the firstName, lastName, and city values from the person object and assign them to variables with the same names. Note that we&#39;re also using destructuring to extract the city value from the nested address object.</p><h4>Conclusion</h4><p>Advanced JavaScript is a vast topic that can take years to master fully. However, by understanding some of the language’s more advanced features, such as closures, prototypal inheritance, promises, async/await, and destructuring, you can create powerful applications that are efficient, easy to maintain, and scalable. I hope this blog post has given you a good introduction to some of these features and how to use them. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2dbdb94dbffd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with JavaScript]]></title>
            <link>https://medium.com/@mjena/getting-started-with-javascript-ea3caa59541c?source=rss-598480f311d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea3caa59541c</guid>
            <category><![CDATA[basic-javascritp]]></category>
            <category><![CDATA[js]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Manoranjan Jena]]></dc:creator>
            <pubDate>Mon, 03 Apr 2023 07:34:09 GMT</pubDate>
            <atom:updated>2023-04-03T07:34:09.853Z</atom:updated>
            <content:encoded><![CDATA[<h4>Basic concepts and examples</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sP0LH8fCUMyeB9eH2J6KGQ.png" /></figure><p>JavaScript is a popular programming language used for creating dynamic web pages and interactive user interfaces. If you’re just starting out with JavaScript, this guide will provide you with a solid foundation to get started.</p><h4>Variables and Data Types</h4><p>JavaScript uses variables to store data values. There are three ways to declare variables in JavaScript: using var, let, or const. The var keyword is used to declare a variable with global or function scope, while let and const are used for block scope.</p><pre>var myVariable = &quot;Hello, World!&quot;; // global or function scope<br>let myNumber = 42; // block scope<br>const myConstant = true; // read-only variable</pre><p>JavaScript supports several built-in data types, including strings, numbers, booleans, arrays, and objects.</p><pre>let myString = &quot;This is a string&quot;;<br>let myNumber = 42;<br>let myBoolean = true;<br>let myArray = [1, 2, 3];<br>let myObject = { name: &quot;John&quot;, age: 30 };</pre><h4>Functions</h4><p>Functions are reusable blocks of code that can be called from different parts of your program. In JavaScript, functions can be declared using the function keyword or using arrow functions.</p><pre>// Function declaration<br>function addNumbers(num1, num2) {<br>  return num1 + num2;<br>}<br><br>// Arrow function<br>const multiplyNumbers = (num1, num2) =&gt; {<br>  return num1 * num2;<br>};</pre><h4>Control Flow Statements</h4><p>JavaScript includes several control flow statements, including if/else statements, switch statements, for loops, while loops, and do/while loops. These statements allow you to control the flow of your code and execute certain code blocks conditionally or repeatedly.</p><pre>// If/else statement<br>let myNumber = 42;<br>if (myNumber === 42) {<br>  console.log(&quot;The answer to the ultimate question of life, the universe, and everything.&quot;);<br>} else {<br>  console.log(&quot;I&#39;m sorry, I do not have an answer.&quot;);<br>}<br><br>// For loop<br>for (let i = 0; i &lt; 10; i++) {<br>  console.log(i);<br>}<br><br>// While loop<br>let counter = 0;<br>while (counter &lt; 10) {<br>  console.log(counter);<br>  counter++;<br>}</pre><h4>Objects and Classes</h4><p>In JavaScript, objects are a fundamental concept that allows you to group related data and functions together. Objects can be created using object literals or using constructor functions.</p><pre>// Object literal<br>const person = {<br>  name: &quot;John&quot;,<br>  age: 30,<br>  sayHello() {<br>    console.log(`Hello, my name is ${this.name}`);<br>  }<br>};<br><br>// Constructor function<br>function Person(name, age) {<br>  this.name = name;<br>  this.age = age;<br>}<br><br>Person.prototype.sayHello = function() {<br>  console.log(`Hello, my name is ${this.name}`);<br>};<br><br>const john = new Person(&quot;John&quot;, 30);<br>john.sayHello();</pre><h4>Conclusion</h4><p>JavaScript is a versatile language that is used for building web applications and many other types of software. By mastering the basics of JavaScript, including variables, data types, functions, control flow statements, and objects, you’ll be well on your way to building your own powerful JavaScript applications.</p><blockquote>Stay tuned for discovering more on JS in the coming blogs :)</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea3caa59541c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Responsive Portfolio Website Design]]></title>
            <link>https://medium.com/@mjena/responsive-portfolio-website-design-cdfba90b6965?source=rss-598480f311d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdfba90b6965</guid>
            <category><![CDATA[js]]></category>
            <category><![CDATA[responsive-design]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[portfolio]]></category>
            <dc:creator><![CDATA[Manoranjan Jena]]></dc:creator>
            <pubDate>Mon, 27 Mar 2023 07:18:47 GMT</pubDate>
            <atom:updated>2023-03-27T07:18:47.951Z</atom:updated>
            <content:encoded><![CDATA[<h4>Creating a Responsive Portfolio Website Using HTML, CSS, and JS</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*K2VEOifMrlMFA5uoLKGb-A.jpeg" /></figure><p>Designing a portfolio website can be a great way to showcase your skills and work to potential clients or employers. A responsive portfolio website that looks good on all devices is essential in today’s world where people access the internet from different devices. In this tutorial, we will guide you through the process of designing a responsive portfolio website using HTML, CSS, and JS.</p><p><strong>Step 1: Plan and Organize Your Website</strong></p><p>The first step in designing a portfolio website is to plan and organize the layout of your website. Decide on the sections you want to include, their order, and the content you want to display in each section. A typical portfolio website may include sections like home, about me, education, experience, projects, and contact me.</p><p>Once you have a clear idea of the sections you want to include, create a wireframe or a rough sketch of your website’s layout. This will help you visualize the structure of your website and make it easier to design the website.</p><p><strong>Step 2: Create HTML Structure</strong></p><p>The next step is to create the HTML structure of your website. Open a new HTML file in your text editor and create the basic structure of the webpage. Here’s an example:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br> &lt;meta charset=&quot;UTF-8&quot;&gt;<br> &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br> &lt;title&gt;Portfolio Website&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br> &lt;header&gt;<br>  &lt;nav&gt;<br>   &lt;ul&gt;<br>    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br>    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;About Me&lt;/a&gt;&lt;/li&gt;<br>    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Education&lt;/a&gt;&lt;/li&gt;<br>    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Experience&lt;/a&gt;&lt;/li&gt;<br>    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Projects&lt;/a&gt;&lt;/li&gt;<br>    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact Me&lt;/a&gt;&lt;/li&gt;<br>   &lt;/ul&gt;<br>  &lt;/nav&gt;<br> &lt;/header&gt;<br><br> &lt;main&gt;<br>  &lt;section id=&quot;home&quot;&gt;<br>   &lt;!-- Content for Home section goes here --&gt;<br>  &lt;/section&gt;<br><br>  &lt;section id=&quot;about-me&quot;&gt;<br>   &lt;!-- Content for About Me section goes here --&gt;<br>  &lt;/section&gt;<br><br>  &lt;section id=&quot;education&quot;&gt;<br>   &lt;!-- Content for Education section goes here --&gt;<br>  &lt;/section&gt;<br><br>  &lt;section id=&quot;experience&quot;&gt;<br>   &lt;!-- Content for Experience section goes here --&gt;<br>  &lt;/section&gt;<br><br>  &lt;section id=&quot;projects&quot;&gt;<br>   &lt;!-- Content for Projects section goes here --&gt;<br>  &lt;/section&gt;<br><br>  &lt;section id=&quot;contact-me&quot;&gt;<br>   &lt;!-- Content for Contact Me section goes here --&gt;<br>  &lt;/section&gt;<br> &lt;/main&gt;<br><br> &lt;footer&gt;<br>  &lt;!-- Content for Footer goes here --&gt;<br> &lt;/footer&gt;<br><br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>In the above code, we have created the basic structure of our webpage. We have included a header section that contains a navigation menu with links to different sections of the website. We have also included a main section that contains the different sections of our website and a footer section at the end.</p><p><strong>Step 3: Add CSS Styling</strong></p><p>Once you have the basic HTML structure of your website, you can start adding CSS styling to make it look visually appealing. You can either create your own CSS file or use a CSS framework like Bootstrap to save time.</p><p>Here’s an example of how to style the navigation menu using CSS:</p><pre>nav {<br> background-color: #333;<br> color: #fff;<br>}<br><br>nav ul {<br> margin: 0;<br> padding: 0;<br> list-style: none;<br> display: flex;<br> justify-content: space-between;<br> align-items: center;<br>}<br><br>nav li {<br>  margin: 0 10px;<br>}<br><br>nav a {<br>  color: #fff;<br>  text-decoration: none;<br>  font-size: 18px;<br>  padding: 10px;<br>}<br><br>nav a:hover {<br>  background-color: #fff;<br>  color: #333;<br>}</pre><p>In the above code, we have added some basic styling to the navigation menu. We have set the background color to dark gray, the text color to white, and added some spacing between the menu items using `flexbox`.</p><p>Similarly, you can add CSS styling to the other sections of your website.</p><p><strong>Step 4: Make the Website Responsive</strong></p><p>The next step is to make the website responsive so that it looks good on different devices like desktops, laptops, tablets, and smartphones. To make the website responsive, we can use media queries in CSS.</p><p>Here’s an example of how to make the navigation menu responsive:</p><pre>@media (max-width: 768px) {<br>  nav ul {<br>    flex-direction: column;<br>  }<br><br>  nav li {<br>    margin: 10px 0;<br>  }<br>}</pre><p>In the above code, we have used a media query to target screens with a maximum width of 768 pixels. Inside the media query, we have changed the `flex-direction` property of the `nav ul` to `column` and added some margin to the `nav li` to make the menu items stack vertically on smaller screens.</p><p>Similarly, you can add media queries to other sections of your website to make them responsive.</p><p><strong>Step 5: Add JavaScript Functionality</strong></p><p>The final step is to add JavaScript functionality to your website to make it interactive. You can use JavaScript to add animations, form validation, and other interactive features to your website.</p><p>Here’s an example of how to add a smooth scroll animation to the navigation menu:</p><pre>// Smooth scroll animation<br>$(&#39;nav a&#39;).on(&#39;click&#39;, function(event) {<br>  if (this.hash !== &#39;&#39;) {<br>    event.preventDefault();<br>    const hash = this.hash;<br><br>     $(&#39;html, body&#39;).animate(<br>      {<br>       scrollTop: $(hash).offset().top<br>      },<br>      800<br>      );<br>    }<br>});</pre><p>In the above code, we have added a smooth scroll animation to the navigation menu using jQuery. When a user clicks on a menu item, the webpage will smoothly scroll to the corresponding section of the website.</p><p><strong>Conclusion</strong></p><p>In this tutorial, we have learned how to design a responsive portfolio website using HTML, CSS, and JS. We have covered the basic steps involved in creating a website, including planning and organizing the layout, creating the HTML structure, adding CSS styling, making the website responsive, and adding JavaScript functionality. With these skills, you can create a professional-looking portfolio website to showcase your skills and work to potential clients and employers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdfba90b6965" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>