<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>React Native framework - All Technical Talk Here</title>
	<atom:link href="https://etechnicaltalks.com/tag/react-native-framework/feed/" rel="self" type="application/rss+xml" />
	<link>https://etechnicaltalks.com</link>
	<description>Gain Knowledge And Get Success</description>
	<lastBuildDate>Thu, 15 Jun 2023 08:01:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://etechnicaltalks.com/wp-content/uploads/2021/03/cropped-etechnicaltalk-favicon-icon-32x32.png</url>
	<title>React Native framework - All Technical Talk Here</title>
	<link>https://etechnicaltalks.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Building Animated view using React Native framework</title>
		<link>https://etechnicaltalks.com/technology/building-animated-view-using-react-native-framework/</link>
					<comments>https://etechnicaltalks.com/technology/building-animated-view-using-react-native-framework/#respond</comments>
		
		<dc:creator><![CDATA[etechnicaltalk]]></dc:creator>
		<pubDate>Thu, 15 Jun 2023 08:00:48 +0000</pubDate>
				<category><![CDATA[Design and Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Animated Library for the project]]></category>
		<category><![CDATA[Building Animated view]]></category>
		<category><![CDATA[Building Animated view using React Native framework]]></category>
		<category><![CDATA[design and development]]></category>
		<category><![CDATA[etechnicaltalk]]></category>
		<category><![CDATA[incorporating an animated view]]></category>
		<category><![CDATA[React Native framework]]></category>
		<guid isPermaLink="false">https://etechnicaltalks.com/?p=9025</guid>

					<description><![CDATA[<p>Building Animated view using React Native framework Building interactive buttons, graphics and icons may be easy but have you thought of adding animation to your app? With animation, I meant to imply motion objects or elements. Yes, React Native can be used to build animated views. If you are not familiar with the process, don&#8217;t worry. This tutorial blog will guide you through the process of building a moving object and adding it to your&#8230;</p>
The post <a href="https://etechnicaltalks.com/technology/building-animated-view-using-react-native-framework/">Building Animated view using React Native framework</a> appeared first on <a href="https://etechnicaltalks.com">All Technical Talk Here</a>.]]></description>
										<content:encoded><![CDATA[<p><strong>Building Animated view using React Native framework</strong></p>



<p>Building interactive buttons, graphics and icons may be easy but have you thought of adding animation to your app? With animation, I meant to imply motion objects or elements. Yes, React Native can be used to build animated views. If you are not familiar with the process, don&#8217;t worry. This tutorial blog will guide you through the process of building a moving object and adding it to your RN app.</p>



<h1 class="wp-block-heading"><a></a>What is the need of incorporating an animated view?</h1>



<p>Designing an animated view and incorporating the same into the UI of an app can enhance its UX. This will, in hand, increase user satisfaction. Experts of <a href="https://www.4waytechnologies.com/react-native-app-development">React Native development company</a> can easily add an animated view using the third-party library.</p>



<p>This is similar to the topic of momentum. Once an object is set in motion from its inertia state, it cannot be brought to a state of rest immediately. A similar kind of state can be created for the app&#8217;s interface using the Animated component of React Native.</p>



<h1 class="wp-block-heading"><a></a>Considering the Animated Library for the project</h1>



<p>As you will be using the animated component for the project, you should be familiar with the context of the animated Library in React Native. You have to add properties from this Animated Library and bring variation to your animated view. This library is designed with the intent to make the task of developers much easier. The purpose of the Animated Library is the same as that of the Animated API. You can consider the Animated API or the Animated Library the same. These are used to ensure consistency in the animation.</p>



<p>As far as the operation of the Animated API is concerned, it works on the declarative connection to ensure the timely presentation of the animated view.</p>



<p>When you are using the component Animated, you have to associate it with six distinct child components namely ScrollView, Image, Text, FlatList, and SectionList. There is also an option to design other animatable components. In this regard, you have to consider Animated.createAnimatedComponent().</p>



<p>Isn’t it interesting that the React Native framework can provide you with greater flexibility?</p>



<p>However, other than these animatable components, you need to focus on the Aimated.ValueXY and Animated.Spring() method.</p>



<h2 class="wp-block-heading"><a></a>Animation.spring() method</h2>



<p>Since we are focused on designing a spring-animated view, we need to consider this method. While using this method, you have to link an object of configuration (animation), comprising properties like friction, toValue, bounciness, useNativeDriver, and delay. These properties and specific values added to it define the pattern and consistency of your created animated view.</p>



<p>You will learn about these properties later in the section of the codebase.</p>



<h2 class="wp-block-heading"><a></a>Animated.ValueXY: Creating animation in 2D view</h2>



<p>If not ValueXY, we could have used the standard form of a value class, i.e., the Animated.Value. However, for the current project, we will consider the 2D animated view. The ‘X’ and ‘Y’ linked to the Animated.Value is to mention the value of X and Y. thus you can be specific about its initial state and the ending state, which may not be possible to attain with Animated.Value.</p>



<h1 class="wp-block-heading"><a></a>Prerequisites context</h1>



<p>For an RN project, there are two mandatory prior-needed tasks that you have to checklist before getting into the codebase. They are as follows.</p>



<ul class="wp-block-list"><li>Setting up the Environment- If you have already set it up, move to the second step. However, if you have not, you cannot skip this step and install Node.js, android Studio, and the VS code editor. If you need a detailed step, you can <a href="https://www.4waytechnologies.com/blog/how-to-set-up-the-react-native-development-environment">visit the attached blog article</a>.</li><li>A template for the project- You have to execute the command npx react-native init AnimationProject &#8211;version 0.68.1. In your command prompt. This will create the required template for the project.</li></ul>



<p>Now we will start with the codebase.</p>



<h1 class="wp-block-heading"><a></a>The Codebase design in the App.js file</h1>



<p>Open the template (AnimationProject) that you built for the project. Note that you have to open it from the VS Code editor. Now, open the App.js file. Clear all the code syntax stored in this App.js file.</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1010" height="72" src="https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-1.png" alt="" class="wp-image-9026" srcset="https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-1.png 1010w, https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-1-300x21.png 300w, https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-1-768x55.png 768w" sizes="(max-width: 1010px) 100vw, 1010px" /></figure>



<p><strong>Image 1</strong></p>



<p>You have to import the core React Native components from the react-native library. The StyleSheet component is for styling the added objects. The Text component is used for adding text elements. The View component is for adding containers and wrapping text elements.</p>



<p>Most importantly, the Animated component is for creating the animated view.</p>



<p>Also, you have to import the useEffect hook and React component.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="212" src="https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-2-1024x212.png" alt="" class="wp-image-9027" srcset="https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-2-1024x212.png 1024w, https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-2-300x62.png 300w, https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-2-768x159.png 768w, https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-2.png 1268w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>Image 2</strong></p>



<p>First, the code specifies the App component. Animated.ValueXY is introduced in the codebase for setting the initial value of x and y as 0. This means that the Animation will start from 0,0. It will go till x: 200 and y:200. It is delayed by 2 seconds. The bounciness property of the animation is 50 and it uses the Native driver.</p>



<p>You can notice the properties that you have to use with the Animated.ValueXY.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="303" src="https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-3-1024x303.png" alt="" class="wp-image-9028" srcset="https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-3-1024x303.png 1024w, https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-3-300x89.png 300w, https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-3-768x227.png 768w, https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-3.png 1132w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>Image 3</strong></p>



<p>The code snippets mentioned in mage 3 specify the style of the animation. The properties used with it are height, width, borderRadius, backgroundColor, and transform.</p>



<p>The position.x and position.y are the values used to mention the coordinates of x and y respectively of the considered object.</p>



<p>Lastly, you have to export the App.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="169" src="https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-4-1024x169.png" alt="" class="wp-image-9029" srcset="https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-4-1024x169.png 1024w, https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-4-300x50.png 300w, https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-4-768x127.png 768w, https://etechnicaltalks.com/wp-content/uploads/2023/06/Codebase-design-4.png 1187w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>Image 4</strong></p>



<p>Although I don&#8217;t need to use the StyleSheet component, if you want, you can use this in this way and style the object.</p>



<h1 class="wp-block-heading"><a></a>To execute the codebase</h1>



<p>This is the last step, where you have to execute the program using two commands. The first one is the npm install and the other one is npx react-native run-android.</p>



<p>However, to run this command line, you have to create a new terminal from your created template ‘AnimationProject’. Run these two given commands. Your virtual device will start presenting the animation of a red ball on it. The red ball is in oscillatory motion.</p>



<p>Consider image 5 as its output.</p>



<p>For informative blogs go here:- <a href="https://etechnicaltalks.com/" target="_blank" rel="noreferrer noopener" title="Etechnicaltalk">Etechnicaltalk</a></p>
		<div class="wpulike wpulike-robeen " ><div class="wp_ulike_general_class wp_ulike_is_not_liked"><button type="button"
					aria-label="Like Button"
					data-ulike-id="9025"
					data-ulike-nonce="b268da30ac"
					data-ulike-type="post"
					data-ulike-template="wpulike-robeen"
					data-ulike-display-likers=""
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_post_btn_9025"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="0"></span>			</div></div>The post <a href="https://etechnicaltalks.com/technology/building-animated-view-using-react-native-framework/">Building Animated view using React Native framework</a> appeared first on <a href="https://etechnicaltalks.com">All Technical Talk Here</a>.]]></content:encoded>
					
					<wfw:commentRss>https://etechnicaltalks.com/technology/building-animated-view-using-react-native-framework/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
