What is up everybody, welcome back to the channel. You guys on today's video, I'm gonna simply be taking you through a Facebook business manager setup tutorial.  I'm gonna take you straight through a tutorial, you guys.   On your end, Facebook will try to persuade you or try to entice you to run an ad and boost a post, right? A lot of clients I speak to, a lot of small business owners that I speak to, try doing that, they'll boost a post here and there and think they're advertising, right? You don't wanna do that.  Now by default, everyone has an ads manager, right? You have a Facebook personal profile, you have a Facebook business page. By default, you have an ads manager and you can run ads through the ads manager, but the ads manager doesn't give you all the functions, all the functionality, all the buttons, all the options, all the settings, all the features that you get through the business manager. Meaning you're not able to set up custom audiences, you can't put your pixel on anything, you can't customize your domain, you can't integrate your Instagram account to your Facebook account through the ad, if you're running ads, right? So many, many, and the reporting is a little different as well when you're reading the metrics, running it through the business manager versus the ads manager, right? So if you're for sure delegating this, even if you're, yeah, if you're doing it yourself, that's one thing, right? I'm gonna show you here, we're gonna go step by step, I'm gonna show you how to set it up, but also if you're delegating it to other businesses, if you're hiring a social media guy, if you're hiring an agency, right? To run Facebook ads for you, you have to have your business manager set up, right? So shout out to my client, Alex, a top producer, a kick-ass real estate agent in the state of Texas, really crushing it and fired up for 2022 running ads, scaling her business on social media, getting more into Facebook advertising and Instagram advertising, that's what I'm gonna be helping her with this year, right? So in this case today, she asked me, she said, hey, David, can you set up my business manager? I'm like, sure, let me set it up, let me teach you through it as well. And I just thought I'd share it with you guys over here on my YouTube family as well. So shout out to you guys, 2022, happy new year.  So again, this is really for those of you that are looking to scale your ads, meaning looking to stay consistent this year, right? 2022 and beyond, you're looking to really stay consistent and dive in with Facebook advertising and Instagram advertising. You for sure, for sure, for sure, wanna set up your business manager, okay? So here's how we do it. So let me get into it. As we come over here to your Facebook page, right? You can start from your page, you can start from your business page, whatever. All we're looking for is this little home button at the top, right?  So again, by default, everyone has an ads manager. So as you click on ads manager, that's gonna bring you straight over here, right? So this is what's connected to your personal profile. It's what's connected to your business page. You can for sure run ads out of here, but again, you just don't get all the settings. You don't get all the features. You don't get the ability to put your Pickful on anything. You don't get any of the tracking functions that you need to know and that you need to implement to be successful with your ads, right? Facebook ads, Instagram ads, right? This is where all the magic happens in the ads manager. But what we wanna do is we wanna take it up a step further, right? We wanna take it a step further and we wanna create a business manager. So we do have all those functions, right? Cause we're gonna need it. We're gonna need a pixel for our landing page. We're gonna need to customize our domain of those landing pages, right? So we could integrate it with Facebook and create custom audiences and we can create custom conversions, right? So those are the advantages of a business manager. We can do all that and that's the most important when it comes to tracking your Facebook ads and your ROI. So over here, as we come over here, right? All we wanna do is click on the three lines and go to business settings. And this is how you know that you do not have a business manager set up because as you click on business settings, let's see where it takes me. So it's taking me straight over here, right? So as you see the screen right here, we already know we don't have a business manager. So it's this simple. All we're gonna do is click on this blue button right here to the right, create account. And this is where we simply put down our business name. Now you can always change this. You could edit this, you can always change it but that's what I'm gonna do right here. I'm gonna just simply leave that name but then I'm gonna name this Alex realtor. And then Alex can always go in and change it. So this should be an email that you use to conduct business. We'll send an email to verify it. So let's see if I can get through it without that, yeah, okay. So let me put this in really quick, I'll be right back. Okay, so once you simply verify that email, right? You put your email in, you check Facebook right away, you verify that email, super, super important. Then it's gonna bring you to the new suite which let me just confirm this, allow, okay. So go ahead and confirm this. So as I'm coming in here, you guys definitely wanna confirm all of this. You can put your password in there which I'll do that part later. But yeah, if you have your Instagram account, make sure everything gets connected there. Okay, so by default, by default, this is where they end up bringing you. Now where you wanna be in my professional opinion, you wanna be back in the ads manager. I'm gonna show you today's tutorial, 2022. This is how people are still crushing it through the business manager. This is the new business suite and you can see certain stats here but as we go back to the personal page and we click on the home at the top and we go back to the news feed, right? So let me pull this back over here and over here on the left, again, we're gonna see ads manager. Now, here's what we wanna do. We wanna go back into the ads manager. We wanna go back into the ads manager and now on the top left, the top left, we're gonna see the three lines. So I'm gonna close out that other Facebook business suite. I'm gonna close that out. I'm gonna come over here back to the ads manager.  Now it's gonna bring me into a whole another page, right? Which I didn't have before, right? I didn't have it with my ads manager. So now look, now I come here. This is your business manager. So boom, I just set this up, right? To the top left, Alex Router. Now you can always change that and I'm gonna show you, you can always change that and I'll show you where to change that but that's the name of the business manager. So now as I hit this dropdown, now I hit this dropdown, we got the business account and then we have the personal account, right? So again, the personal account is simply the ads manager by default that is tied to the personal page, to you, to your business page, to you, to one account. That's one account, that's you. Now we have a business manager and again in the business manager, we now have the ability to add different ad accounts. So let's say for example, I wanna run ads for one business and then I wanna run ads for a different business. I can separate those accounts, those credit cards and those that ads spent and I can have it charged on multiple accounts. I can create multiple ad accounts. There's my Instagram account. There's where I wanna connect my Instagram account. The data sources now, boom, there's my pixel, right? There's my pixel. So as I go in and create landing pages, which is what you guys wanna do, you guys wanna for sure create landing pages, okay? As you go into 2022 and your marketing online, stop sending traffic to your pretty website. Your pretty website's not gonna do it for you in 2022. You gotta be taking people to a landing page. So whatever your offer is, you own a restaurant, you own a restaurant, start running ads to your local area on a free download. Hey, click here to download your free hamburger. One free hamburger on us, click now to download, right? You start running ads to get people to download something for free. You're an insurance broker, okay, run ads to get people a free download on insurance and what it takes to purchase and the pros and cons.  Run ads and give away a free PDF of a buyer's guide and teach people in five pages on a PDF what it takes to buy, right? Simple, like this is our bait, right? So as you start to put out ads, as you start to make them enticing, as you get people to download free offers from your coupon access to a webinar, access to a PDF download, a free buyer's guide, a free seller's guide, that's gonna happen from a landing page, okay? So a landing page, simple webpage. Here's an example for real estate. Like if I was on Facebook, if I was on Facebook and I'm just kinda scrolling through Facebook, scrolling through Facebook and let's say I'm running an ad for, I don't know, for a property. Let's say I have an open house coming up this weekend and I'm running a Facebook ad. I'm running a Facebook ad and my whole objective is to capture leads. Let's get some people to this open house this weekend. Let's capture some leads. Let's get some name and emails. Let's get people to schedule appointments. Let's get people to schedule private showings. That all can happen from a simple page, a simple webpage, a simple landing page. So for example, as an individual is on the news feed, right? They're scrolling through the news feed on their computer, on their cell phone, whatever. And they're just scrolling through, scrolling through. And then all of a sudden we come across a sponsored ad. When that sponsored ad is here in the news feed and I click, I'm coming straight to a basic page like this. It's not my website. There's not a million things to click on. In fact, there's only one. And it's a yellow button, right? Simple page. This could be an open house. This could be a listing page, right? I'm promoting a listing. I'm running a Facebook ad. They see the ad, they click. They come straight to this one page. This is a landing page. So now, and so this is what you guys wanna be doing, man.  If you're trying to drive traffic online, you're trying to build a brand online, any type of personal brand, any type of business, you're driving them to a landing page. So I've been using Cartra since 2018. I use it for my landing pages, for my email automation. I use it for my online calendar. I use it for my digital courses. I use it to host videos. I use it for affiliate marketing. And that's pretty much all I use it for. And then I also use it to package up funnels and give them to clients. So that's why I have a lot of these pages already done. That's a listing. This other one is a seller guide. So anyone that jumps on Cartra with me, if you're in the real estate space, I have these funnels that I just give you. So there's a link in the description. ProfitwithCartra.online, activate a 14-day trial. I'll email you right away with all my contact information. We'll jump on a call. I'll literally take you by the hand and help you get off to a fast start. We'll transfer some funnels to your account for free and it'll help you crush it because this is how we capture leads, right? Driving traffic to a simple page like this where I'm giving away something of value upfront for free and exchange for that person's name and number, right? So that's how you capture leads, man. And that link at the top, that link at the top, if you're running ads, Facebook ads, Instagram ads, that link at the top has to be yours, your custom domain. And that's what you now integrate inside of Facebook. So inside of Facebook in the business manager, that's another advantage. Another benefit is that now over here, you can connect your domain. Okay, super powerful, super, super important. This is how Facebook starts tracking what's going on with your links. It starts tracking who's landing on your links, who's landing on specific links, right? It could be alexriltor.com forward slash buyer guide, alexriltor.com forward slash seller guide, alexriltor.com forward slash open house 777 Blue Ivy Road. These links need to be tracked. And so in Facebook, it's very, very basic, very, very simple. You integrate your domain and you start creating custom audiences around every specific domain, right? So I have a ton of videos, you guys. So if you're new to my channel, subscribe. My name is David. I'm out here in San Diego, been building a social media agency since 2017 and really just documenting what I do, social media marketing, Facebook advertising, landing pages. And so, yeah, cartridge just happens to be a great one that I've been on forever. And I run my entire online business. So this is what you wanna be doing with Facebook is integrating that domain. And then for sure, integrating it through your software provider, through in this case, it's Cartra. And then I have a whole video for that. So in fact, I'll link that at the bottom, how to connect the domain. But that's what you wanna do for sure. And then over here, over here in the business info, this is where I can change out alexriltor. So if I wanna change out that name, I can for sure change out that name. What I wanna do right here is I wanna make sure that the business page is connected. So I wanna make sure that this page is connected to the primary page, which let me pull that one up. Yeah, we'll use this one. We'll use this one. Okay, here's the middle of our question. The middle of our question is, okay, we're running an ad. What is the most important page that we're trying to get them to? So there's the ad. What is their number one, number one, number one objective? Is it to get me to stop and read it? Is it to get me to comment? Is it to get me to share it? Is it to get me to click? So I'm gonna book now or I'm gonna learn more. That one says book now. Let's see if we can find a different call to action button. Here's Kerbio. There's get offer, right? That's a get offer. Let's see if we can find another one. Here's a better help sponsored ad. This is a learn more, right? So again, the middle of our question is what is your number one objective? What is the most important objective? What are you trying to get that person to do? If I, which I am, I'm asking you guys, but if I just asked somebody one-on-one and I said, hey man, what's the most important page? Nine out of 10 times that person would say, well, David, it's to get them to click. Okay, so you're telling me the most important page to get people to. Is this one? The most important thing to get someone to do is click. Okay, interesting. Interesting. I would disagree. I would disagree. I would disagree. That's not the most important page that I'm trying to get people to. The most important page I'm trying to get them to is the next page. Is what page do they land on after they have just completed the action? So, showing you this real estate one, for example, let's say I'm running an ad on a listing, right? Let's say I'm running an ad on an open house. Let's say this is, boom, there's my listing right there, right? Or let's just say, yeah, yeah, yeah, let's go with, let's go with the listing example because I have a listing page here. Okay, let's go back. There's my listing. There's my listing. I'm running a Facebook ad. I'm running an Instagram ad. There's the text. They're sponsored. There's the image of the listing. They click. They come straight to this one page. So if you're telling me the most important objective, the most important thing that we're trying to get them to do is click. Here's what I'm saying. The most important objective, number one, the only reason why I'm running the dam ad is to not just get them to click, but to get them to click, opt in and land and specifically land on this next page. That's the second page. That's what we call a thank you page. It's what we call a confirmation page. It's a page that a lead lands on after they completed the action, right? And the action was to opt in. So that could have been an opt in for a free coffee. That could have been an opt in for a free seller guide. That could have been an opt in for a free listing, information on a listing if you're into real estate. That could have been an opt in to download your free health insurance guide, seven things to avoid before you get your life insurance policy, right? And that's a five page PDF and you're trying to get people to download it. You're running ads to capture leads and get people to download it, right? They land on this page. This is your custom conversion. So again, back to over here, that's why the business manager is so, so important because now we're able to really take it a step further and really, really, really leverage and maximize these ads. We get to tell Facebook, hey man, no dude, the number one objective is not to give them a click, no. Because if they click, you're telling me, okay, that's my number one objective. If they click and that's all they do. So I clicked, I landed here. That's all you asked for, right? That's what's gonna happen. So that's a traffic ad. A lot of people run traffic ads.  Traffic is telling Facebook, hey man, I'm just getting people to click. I'm just getting people to click. No dude, I don't need them just to click.  I need them to land on the confirmation page because anybody that lands on the confirmation page, that's a lead, right? You can't land here by Googling it. You ain't gonna find this page, right? You only get to it once someone opts in. So I'm able to take this link, give it to Facebook, call it a custom conversion. And so as I go and run my ad, I specifically link that custom conversion to that ad set. And now Facebook knows, hey man, okay, David's not looking just to give people to click. He's not looking just to give people to the landing page. He's trying to get people to the confirmation page. He's looking for leads, he's looking for sales. So anyone that were to set up a custom conversion, it really is these three main objectives. So if your main objective as a business owner is to capture a lead, that's custom conversion. If your objective, so capture a lead, getting someone to download your PDF, getting someone to register for a webinar, right? That's mainly what the top marketers put out is either a free webinar or they're giving away some free PDF, some e-book, some free download, right? Okay, so that's number one. Number one, you're trying to get, you're trying to give me to download something. You're getting me to a webinar. You're capturing a lead, right? You're getting me to opt in for your listing. You're getting me to opt in for your open house. Your objective is to capture lead. To capture lead, that's number one. So if that's you, custom conversions. Number two, if you're in the business of making sales, you have a website, you sell products online. So physical products, right? You have a Shopify store. You have any type of online commerce website where you're selling products, necklaces, hats, hoodies, microphones, cell phone cases, whatever, right? And you're trying to drive traffic to make sales. That's custom conversion. That's number two. Number three, it's appointments. So if your main objective is to run ads to get people to schedule appointments with you, right? Custom conversion. Again, it's something you couldn't access with just your ads manager. That's why the business manager is so, so, so powerful. Okay, so now we got that out the way. That's the custom conversion. Once you have landing pages, then you take the link of the confirmation page and you simply integrate it. You set up a custom conversion. I'll tie that video down below as well, how to create a custom conversion. And you can definitely learn through that as well, but you wanna have your landing pages up. So prop it with cartridge.online, activate a 14-day trial and I'll help you with all the landing pages. It's the landing pages, the email automation and your online calendar. And then all these other bells and whistles, but really, again, if you're driving traffic online, it's mainly those three tools. Okay, so that's all in Cartra. So, and then also, yeah, there's the domain. So you would integrate the domain, get a domain through GoDaddy. Very, very simple. What you can do is just go into incognito window. So just click right here, go into new incognito window, go to Google and type in cheap domains. Cheap domains.  Happy New Year's, guys. And then as you come into incognito, what I'm looking for is I'm actually looking for GoDaddy, which I'm pretty sure on your end, I've done it a million and one times.  But when you go cheap domains in incognito, go straight from Google, you'll see an ad up here at the top for 99 cents for GoDaddy. There's 2.99, which is still only 2.99, right?  So I always would hack it and get it for 99 cents. So what I always do is make sure whatever name you're trying to bring to the marketplace, go and get the dot com. Go and get the dot com because you're gonna need that dot com to tie to your landing pages and to integrate with Facebook. Okay, so whatever dot com, whatever domain you wanna use for your ads, that's what you wanna do there. And then you could do your payment method here as well, you could put your credit card in. But really, I do the credit card through the ad account. Okay, so as I'm setting up the ad account, I do it through there. So now as we come up here to the top, click on the three lines, now we go back to ads manager. So that's the business manager, you guys. That's the business manager. I'll tie a bunch of videos in the description on how to set up the custom audience, how to install the pixel, how to set up the custom conversion. I'll tie those three videos down at the bottom because that's really what's next. But again, to really maximize those features, which are 1,000% required necessary mandatory, you have to be utilizing those features when you're scaling your ads.  So again, profitwithculture.online, that link is in the description. Activate a four-day trial and I'll help you, I'll help you with all that. So now as I come to the ads manager, right now, I have these two different accounts. Now I have the top one, now I have the bottom one, and now I am ready to party. Now I'm ready to freaking crush it. Come in here, click on create, and then that's when we're gonna simply account info needed. So this right here, the email was sent, so hopefully she confirms that soon. That's why you wanna, once you've put in that email, make sure you verify it right away.  And that's again, mainly for those of you that are looking to capture leads, make appointments or make sales. If that's your number one objective with online advertising, then that's for sure what you wanna be doing, okay guys? So over now, that is your business manager. What I would do is I would bookmark it for sure, I would bookmark it from the business settings. So now as you come over here to business settings, you can bookmark it from over here and then you can just kind of have it here at the top and come straight into this part as you rock and roll. So in here again, you got your pages tied, you got the people, make sure the names right there and then you got pages right here. So there's the actual page, it's still pending, which is fine. And that we should have got access to that right away, but that's okay. So actually, yeah, she'll see it on her and that's fine. And then again, set up your ad account, set up your ad account, connect your Instagram account, the data sources, there's a pixel for your landing pages, there's your custom conversions for your thank you pages, the confirmation pages in your funnel, and then there's the brand safety to integrate the domain. I recommend getting the domain through GoDaddy and then down here, you can put your payment info here for sure and then business info, make sure you update all of this information right here. All right guys, so now actually, yeah, and then make sure you verify the email at the bottom. So that's it you guys, that is a Facebook business manager in 2022 and beyond. So again, if you guys are new to the channel, make sure you subscribe, my name is David. I'm out here just documenting, dropping day in the life content of what I'm doing for either my business or other clients. And a lot of times that's real estate agents setting up Facebook ads for the first time, setting up landing pages and sales funnels for the first time and really trying to scale their business online. So if that's you, if you're new to the channel, subscribe, smash the bell for notifications and drop me a comment below. Let me know where you guys are coming from and let me know how I can bring value to what you got going on. All right guys, over now.


Welcome to the Crimson Engine. My name is Rubidium. Today we are talking about color science. What it is, how it got that way, and how you can use it to become a better filmmaker. Let's start with what it isn't. It isn't the science of color. It isn't the science of how different wavelengths of light are interpreted by our eyes as different colors. It's also not but it is related to the psychology of color. How different colors make us feel or what emotions different colors are associated with. Color science is how a particular manufacturer's camera sensor interprets and changes the colors it perceives to produce the image that the camera captures. It varies between models of camera but almost always one particular manufacturer will have pretty much the same color science. If you wanted to simplify it you could say that it's a LUT or lookup table built in to the camera. Now it would be fair to ask why camera manufacturers don't just give you all the colors that the sensor captures and let you choose and pick the ones you want in post-production. And to be fair some companies do this. The red camera company did this for about 8 years before it transitioned to a more manipulated color in the IPP2 color gamut. And Sony cameras still pretty much give you quote-unquote faithful colors. They don't overtly manipulate the colors coming off the sensor to the image that's stored on the card. But the other three big camera manufacturers, Arri, Canon and Panasonic, all sweeten or manipulate the colors coming off the sensor so that it leaves you less work to do in post. When Arri who made film cameras for 100 years designed their digital camera, the Alexa, they tried to emulate the colors of 35mm chemical film. They tried to make the digital image look as filmic and as cinematic as they could. And to do this they manipulated the way that the camera sees and processes color. They took both the reds and yellows which are seen commonly as imperfections in skin and shifted them closer to orange. So that skin seems more universal and it seems smoother, it seems more consistent. This is what film does and this is what the Arri Alexa did and other camera manufacturers followed suit. When it was Canon's turn to develop a digital cinema camera, they looked both at the Arri Alexa and at their stills cameras which already had built-in looks associated with them. They were even further to warm and brightened skin tones. They also pushed green into blues to make skies look more vivid and color saturated. And generally do a lot of sweetening that has since become known as the Canon look. Color science isn't just a simple remapping of colors, different colors and tones are affected at different ranges. So the mid-reds might shift towards orange but the dark and the light reds might shift towards something else. There is also an element of what you might call forensics in color science. This is when camera manufacturers add colors into the color science to compensate for something else that's happening in the image capture chain. So when the Blackmagic Ursa Mini was first released, it had a really strong purple magenta tint due to the IR filter that they'd put on the camera at the last minute. They were able to compensate for this in a later firmware upgrade. So you were able to upgrade the firmware of the camera which upgraded the color science and got rid of the magenta tint. Color science became more important as shooting times and turnaround times got smaller. So digital cinema cameras are originally meant to have a very long post-production time like film did where you spend days in the grade to make the image look like you want it to. But more and more people were shooting with these cameras and needing to upload a video that day. So color science and the look built into the camera became more important. Aside from dynamic range which the Alexa excels at, there is nothing to stop you building a lot to make your footage look like the Alexa's footage to change the color science of your camera to the color science of the Alexa as long as you shoot in a very flat color profile or shoot in raw. But the question is, do you want to have to do this to every single thing you shoot? Wouldn't you rather have a camera that shot images that once you brought them into a Rec.2020 or Rec.799 color space look good and cinematic right off the bat? If you like a certain camera's look and a lot of people like how the Alexa and how Canon capture colors it makes sense that you then lead with that and sell the color science of a camera. The red camera company who for the better part of a decade had a very scientific and flat accurate color science recently shifted to IPP2 which is a much more manipulated filmic, Kodak looking color space. Because the red camera shoots raw, you can go and open up all your old red camera files, debayer them into this new color science and have a whole new look. That's my look at color science, how it works and how you can use it. Thank you very much for watching. Please leave your questions in the comments and I'll see you next time.


In the previous video, we've made a login screen and also a logout screen at that and it's fully functioning right now The only complaint I still have right now about this code is that it has too much too too much repeating code And also a lot of the functionality is built right into this auth.js file And this file is supposed to only contain the UI components That is why in today's video we'll be making hooks our own custom react hooks to take refactor of the functionality code away from this UI component into its own hook So the first thing I'm going to refactor is the logout function because that's the easiest it seems I'm going to create a folder in our source directory called hooks and I'm going to make a hook here called useLogout.js And one of the main requirements of Making a custom react hook is we have to start the name of the hook with use Just like how just like the convention of how you have to start with a Capitalized letter as the first letter in a react UI component So we we're just going to make use logout and then we can just take the code here. Just take that And put it here so function logout Just put it here. So of course with the import PB and And we have also import you state from react and we can we can make that state variable here And then we can just return logout to the function to the hook function and then here I can just I can just do const logout equals to use logout Save that and we have to run this because it's a function that we have to run So yeah, everything should work and we have successfully refactored all of the logout code to its separate hook outside of this UI component And if I try it out So if I click on logout, it still works One thing I've noticed is that our email and our password is still populated and it's still in react state Even though we have logged out and we're supposed to be starting a completely new session here That's because we forgot to reset our form every single time. So we have we can The structure a function from use form called reset and we can just go to our Where is our our login here? We can just call what reset So that should reset our form By go to user at gmail.com and one two three four five Login if I go logout and it's no longer populated. All right now Let's refactor the code for log into its own hook as well I'm gonna go to the hooks here and make use login.js. That's export default function use login Use login and then we're gonna just grab everything here. I'm gonna leave reset Still here I'm not gonna grab reset as well because we won't have access to the reset function from our use login hook so up to put a function here called async function login and let's Close the brackets and then we have to take our loading state and just grab this and Put that here. We will also want to grab that. Just put it up here Let's see So I'm gonna rename the function here from login to on submit and Then we can go to a hook here. We have to import PB so import PB and We will need access to data. So let's go to the login function here and let's grab Email as well as password. I can get rid of data There and then we can just simply return login and we'll also return is loading and then here we just const login is Loading equals to use login and we have to import that as well So import use login and then just call login here and we have to pass data Dot email and the password. So everything should be working now What's oh with the error here, it's because I have to give email and password their appropriate labels Save that. So if I go to my page and refresh that I do user at gmail.com 1 2 3 4 5 login and it should work and we've Scarcely made our own hook for login and log out and we've taken all of the functionality and put it in their own respective hooks Now, of course, you could just leave it like this and it's completely fine It's perfectly functional, but there's still one thing that I'm not completely happy about our used login hook just yet And that's we're manually creating that is loading state and we have like the try catch blocks here And the code is just kind of clunky in general and we're gonna be making more calls to the API down the road And we're gonna be making more hooks to write to the database and stuff And we're gonna have to manually create a loading state every single time We make a new hook for different functionalities and there's try catch blocks and just clunky That's why I'm gonna use this hook from react query It's called use mutation and it'll simplify a lot of the code for us And of course use mutation isn't the only hook that I'm gonna be using from react query I'm gonna be using this other hook called use query as well, but that's for some later videos So in today's video, I'll just be showing you I can use me the use to use mutation hook to simplify a lot of this code so first we're gonna have to install the react query library and we just have to do yarn add react dash query and that should install a react query and in react query we can just import you can just import use Mutation from react query and just restart the server So here instead of returning our object that contains the login function and those is loading state I can just return use mutation and use mutation takes in I believe it takes in here Okay, let's just look at a syntax real quick It takes in here takes a mutation function as the first argument and a bunch of options and that's optional so the mutation function is going to be the function that we're gonna call to Basically post a request to the server and that's our login function. So I can just put login in here and Use mutation this use to mutation hook is going to return a bunch of things that we can use and that includes is Loading here. See it automatically generates that loading state for us So as long as we pass in an asynchronous function to the as the mutation function It'll automatically detect the loading state and so that means we can just get rid of our loading state code in here and Use mutation will just deal it just handle that first and I believe the way that works is summer and use mutations code It'll do something like oh wait login and then once our login is done It'll set is loading to true automatically So we don't have to deal with that and then another thing it'll do is it'll wrap try and catch blocks Around our mutation function automatically and so we can get rid of that as well and look how clean our code looks now It's everything's gone. It's just the core functionality that remains and we don't have to deal with the errors So the way the way errors are returned back to us is here instead of having the login function It's gonna be called a generic mutate and basically whatever function you put in here Use mutation was output as mutate. It's still the same function, but it's like wrapped around the use mutation Functionality so we can just put mutate there is loading remains the same There still is loading and that's coming from the use mutation hook and also use mutation hook gives us is error And that's a property that we can use to detect if there's an error and Let me just check where my error Where's where's my okay? I have to manually make that error message now. So you can just come here Where's the paragraph text here? It says loading. You can just say if error if is error is true Then you can just say invalid email or password. You could style this to be like red just to be fancy So color be just like red and then here instead of calling that login to this rename that to mutate It's a generic name or you could just rename mutate to login again that way we can reuse the name as login and Yeah, I believe that should work if I go and refresh this I just oh No, no query client set. So we have to fix that error So that's a that's if you go to react queries page and you go to quick start. It'll teach you how you can set up The provider so I believe you have to wrap your app in the query client provider And that's just something that Read query requires for me. So we have to go to our let's just go to index of JS here and just query provider Just put that here Wrap our app with query client provider and it has taken client So client let's look at how the docs do it. They have to make you have to instantiate a new client I guess so we can come up here. Just do Query client equals a new query client you have to import that so Query client, this is some boilerplate that comes with react query. Just set it up once and it'll be good to go forever, so We'll save that let's go back and refresh if I click log out and then now I try to log in I can just log into that fake email just click log in we should see invalid email or password and that way We know that our is error state is working and it's coming from our use mutation hook which is here Use mutation and also if I try to put an actual user Enter and you can see it works and you saw that the loading state was working as well Despite us not having any you can just get rid of the state It's spiders not having any code to deal with the loading state. It still works and use mutation is awesome in that sense


If you've been waiting for the new Samsung Galaxy S22 device, then the team at Appalachian Wireless has some good news for you. Appalachian Wireless is launching all Samsung S22 models on sale. We are you. We are Appalachian Wireless. Wednesday Johnson County Fiscal Court and Johnson County Animal Shelter unveiled a new animal control vehicle that will be used to safely transport animals. We're always trying to upgrade our services in our community and animal control is one of those services that we provide as a county. And so in our efforts to upgrade, we're always looking for ways to improve our equipment. And so the opportunity was identified to be able to purchase very reasonably animal control transport box, which you see behind me on the truck. We were able to buy that for a very reasonable cost and then get that put onto a truck that we already had in the county system. So we repurposed the truck and have to buy a truck. And so now we can provide safe transport for animals that our animal control officer may go out and pick up. It's a much, it's a much better system for transport and a much safer system for them. To transport animals safely, the unit is equipped with ventilation and separated compartments. Johnson County Animal Shelter Director Lisa Trustee Roberts says the vehicle is the first in its history to be used by the shelter. The process that we have had since, well our shelter will be open for eight years coming in July. It'll be our eight year anniversary. And to be perfectly honest, what we had was crates in the back of a truck.  So this we will be 100% in compliance of what we should have here in Johnson County. Having a vehicle like this is very important to the animals, I mentioned before. Just from the moment that Bo picks up an animal, the moment our animal control officer picks up an animal, to the time it comes to the shelter is very important. Those animals come in, they can be scared, they can be hurt, and it just means all the difference in the world to that animal. So it's very important. This provides a stable, safe environment for that animal. And it's just amazing that we have such a vehicle for our animals here in Johnson County. While Robert says the vehicle will assist with animal pickup, it'll also help transport sick or injured pets. Johnson County judge executive, Mark McKenzie says he hopes the truck will be a more permanent solution. Well, we've been talking since last year, so this isn't something that just happened overnight. And the reason being is this type of equipment can be cost prohibitive, and so we were always looking for that opportunity to find a unit that was more in line cost wise with what we felt was doable for us. And so this bed was found out of state, online of course, where most things are. So we were able to secure the purchase of that and went and picked it up and then had it mounted to the existing truck. To report animal issues, you can call<PHONE_NUMBER>. For Mountain Top News, I'm Joel Horgill.


Jerry of the circus trying to build himself up so he can become a strong man We've got to have our lab with our meals Jerry is it aged I guess yeah, but why Be gone mean well you're not exactly on a diet you know Jerry then never mind the potato oh dog Jerry you can stand little kid come on have one of these nice brown Potatoes they're all for good your friend Thomas quite a way to Jerry serves very well sure he can do most anything well how are you making out Carmen you got enough of everything down there and your end of the table Jason yeah look it here comes Tom with that box with a bouquet of vegetables for Carmen now the fun's gonna start a word Jerry we don't want anybody to know we had anything to do well who's your admirer Carmen that sure a pretty box of flowers I have an idea who this is from look she's open and that Jerry haven't seen a vegetable bouquet since I was a boy boy is he in for it what's the fur fly Jerry certainly Carmen what can I do for you what you can do for me isn't major the idea of sending me onions in a pretty box me say something no use for you to say something major if you open your mouth please listen to me comment right exactly I had nothing whatsoever to do with it please believe me Carmen I like you I like you ever so much and I wouldn't humiliate you this way in front of everybody then you make somebody else to send this off to me no I'd be the major mind I'm just as anxious to find out as you are the idea of anyone putting me on a spot like this all right Carmen you just leave it to the major I'll find out who pulled this done if it's the last thing I do all right major you're very deep I pledge my word Carmen I'll get to the bottom of this and I'll get to the bottom of this quick oh oh oh the lights what seems to be the trouble they flickered didn't they I guess the boys are still working on that generator is the generator acting up yeah Patsy they're having a little trouble with it the men are trying to get it to hold out until they can get some new parts for it sent to us I hope I have plenty of lights and I'm up high doing my turn don't we all well Jerry you had enough to eat I'm finished and good then let's get on over to the wagon huh gotta start getting ready for the show pretty soon well see you later folks and I hope those lights are all right when you're working tonight going on in a minute hey bombs yes Jerry should I put rags his collar on him yeah go ahead and fix him up you point out I think you're a stage strong I never in my life saw anybody who was as anxious to act as you are oh still not gonna make you look pretty here big ribbon collar yes y'all sit right all set we're going to go with here we go we're on come on right you a good show now who are you telling me to do Jerry oh Patsy I just don't rags to do his best now doesn't he always give a good performance oh sure but I always say that say how are the lights moving out okay I guess they must have the generator fixed all right I'm surely glad they were working when I did my turn all the time I was up there not copies kept thinking how often it'd be if the lights went out and there I was in midair you just fall into the net you've done that before that's true Jerry but I wouldn't be able to see how far the net was and I might not be able to turn my body so as to land on my back I told you a long time ago how important was the land just right in that net say that's right dangerous business working without lights and that goes for any of the acts well the mendinis are through so they can't get hurt now all we have to worry about is Jason's turn oh there's nothing to worry about the generator's been fixed now the lights haven't flickered since we were having dinner in the mess can I hope you're right Jerry anything new about major and Carmen or are they still angry there's plenty new Jerry I was just talking with Carmen a while ago I found out some things that really scare me oh what's the matter well it's not about the major but Carmen has been getting notes telling her to leave the circus and threatening her with all sorts of terrible things well standing them to her she doesn't know she hasn't told anybody about it except Carlos and Alfredo they're trying to find out what it's all about what are the notes say well one of them wanted to get out of the circus or there would be acid put on their tight wire are you fooling now Jerry I wouldn't fool about a thing like that I'm telling you the truth I saw the note myself Carmen showed it to me but who want to do a thing like that why acid would eat the wire what they get hurt or maybe killed if it broke when they were up they're working on it that's just it it's serious and Carlos and Alfredo were very much upset about it well don't they have any idea who could be sending those notes no they they can't think of anyone who might be an enemy and then the funny part is that the notes are just a common and not to her brothers somebody just has it in for her you're watching the star turn of this oh I'm sorry bombs Jerry and I were talking too much we forgot to watch where you see their eggs we're being slighted as he was just telling me but oh is it all right to tell bumps fancy oh I don't see why not what's up sure go ahead tell me well Karna's been getting threatening notes telling her to leave the show or she'd get hurt what's that yes bombs someone is out to make trouble for carmen well I don't think anyone will get very far making trouble for Carmen with her to able-bodied brothers around it's not so good though Carlos no failure were pretty much concerned about it they're trying to find out who's sending the notes to Carmen here here right now keep out of the way now that Rousseff true will be out in that track in any minute let's stay right there you don't have any idea who might be do you bounce I know Patsy I just can't imagine anyone doing a thing like that especially to come she's such a nice little person I wonder why they I mean I wonder why whoever it is wants her to leave the circus will see that's something to work on right there goodness look at the way those lights are flickering again they're more than flickering they're blinking on and off see this is going to be bad all those horses running around their terrific speed and the lights going on and off they go on steady again yeah I hope they stay on I wonder what the trouble can be I've never seen the lights act this way before come to think of it it's the first time I've ever seen them out of order the men that run that generator usually keep it in tip-top shape they care for that thing like I was a baby he said some certain fires worn out they can't get a new one here so they have to wait until they can get the part sent on and they go off again oh this is awful I wouldn't want to be on those horses now bumps yeah are you still here we haven't moved we'd better stay put until the lights go on now they're coming on again we were sure out a long time those Cossacks didn't even stop riding I guess those horses are so used to doing their turn to just keep right on going whether it's light or dark this makes me feel awfully uneasy bumps it's risky look at that they're they go blinking again well isn't there some way we can get electricity to run the light I suppose though Jerry but I guess it'd take time to get some lines rigged up to the city current hello there looks like we're having some excitement of those lights acting up it's bad Jason it's almost time for you like Jason what are you going to do I'm beginning to think that Pat's is worried about you Jason well I'll admit it bumps I am there's no telling what those lines will do if the lights go out and the audience start screaming they may get so excited that you won't be able to control them Jason now don't you worry about that that's I'll be able to take care of myself I hope so how are you gonna do that excuse me folks I'm on wish me luck we do as you like Jason and we'll keep our fingers crossed for you allow me to call your attention this past deal enclosure which will soon be filled with wild beasts of the jungle in producing at this time take the greatest while in an exhibition of man's skill and daring over your attention ladies and gentlemen we now pretty well there he goes and here come the cats down the chute no matter how many times I see Jason do as that I still get a big thrill out of it he sure is brave there's no doubt about that Jerry oh I just hope he isn't foolish no no patsy I don't care bumps sometimes I think he takes unnecessary chance let me ask you a question patsy your act is a pretty risky one too isn't it oh I don't know no no well it is you don't have any fears about it flying around the top of that tent like a bird you do a dangerous turn there patsy you sure do they went off again oh there they go on again that was a crash car oh there they go out again what in the world is wrong with those lines doesn't look like they're coming back on this time they gotta come back on get some lanterns somebody yeah yeah get some lanterns yeah hurry up now me those lines again it's all right he won't be if those lights don't come on soon


Hello and how are you all today? The question says in a triangle if the square on one side is equal to the sum of the squares of the other two sides, prove that the angle opposite to the first side is a right angle. Use the above theorem and prove the following. In triangle ABC, AD is perpendicular on BC and BD is twice CD. We need to prove that twice BC square is equal to twice EC square plus BC square. So first of all let us prove the stated theorem. For that we need to have this diagram. So we are solving the first part of this question. We are given a triangle such that AB square plus BC square is equal to EC square to prove equal to 90 degree. Now for that we have done a little construction. We have constructed triangle PQR right angle at Q such that QR is equal. Now let us start with our proof. Now QR we have equal to 90 degree that is by construction that we have. So by using the chorus theorem we can write that PR square is equal to PQ square plus QR square right. But we have taken in our construction that PQ is equal to AB and QR is equal to BC right. So we can write that PR square is equal to in place of PQ we can have AB square and in place of QR we can have BC square right. Also the square is equal to AB square plus BC square. It is given to us in the question. So these two equations implies that PR square is equal to EC square or we can see that PR is equal to. So congruent to triangle PQR by SA congruency that is all the three sides are equal to each other. PQ is equal to AB, QR is equal to BC and we have proved above that PR is equal to EC. So we can see that therefore angle B is equal to angle Q is equal to 90 degree that is by CPCT. So therefore angle B is equal to 90 degree. Now if angle B is equal to 90 degree then we have proved that opposite to first side is a right triangle if the square of one side is equal to the sum of square of the other two sides right. So this completes the first solution. Now let us proceed with the second part here we are given that in this triangle ABC AD is perpendicular to BC and VD is equal to twice CD. We need to prove that twice AB square is equal to twice AC square plus BC square. Now let us begin with our proof. Now in triangle ABD and in triangle we have that AD square is E square minus VD square. Let this be the first equation and here we can see that AD square is equal to AC square minus DC square that is by Pythagoras theorem we have proved it and we have just rearranged the terms let this be the second equation. So from the first and the second equation we get since the difference are both equal to AD square so we have AB square minus BD square is equal to AC square minus DC square but we are given to us that BD is equal to twice CD so we can say that now will be BD plus CD so 3 CD plus CD will give us in total 4 CD right. So we have minus CD square square we have just taken this term from the left hand side to the right hand side. Now in substituting the values we have AB square equal to AC square minus CD square plus 4 CD the whole square that is AB square minus CD square 9 CD square this BD is equal to twice CD itself that is AB square is equal to D square plus 8 CD square and fourth BC right. So in substituting this here we have B square is equal to AC square plus 8 into 1 by 4 BC now in place of CD we have 1 by 4 BC this can be solved 8 into 1 by 16 BC square now taking two here we have 2 AB square is equal to 2 AC square plus square now this was a required thing to be proved so hence we have proved the given question hope you understood the solution well I enjoyed it to have a nice day.