Tumgik
#trying out some new filters + layouts :P
pinkpinkparfait · 1 year
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
✿﹗EMU OTORI LAYOUTS! (^_-)☆
matching bios under cut!﹒💗・⭐
bios! (≧◡≦)
name﹙☆﹚prns ◟ᵔᴗᵔ link
♡﹗prns ♪ timezone link ✦
58 notes · View notes
whilomm · 7 months
Note
Hey, so this is kinda off the wall, but I need to find a roommate but I'm so anxious about it, did you use a certain website? Or like do you have any roommate finding tips?
oh yeah i was super nervous about it too bc of previous bad experiences (with college apartments that were auto-matched), i guess my tips would be from someone whos only done this manually Once:
worth a shot, straight up ask if any of your friends need a roomie. sometimes things line up! didnt for me atm (aside from one friend who said "oh maybe in like 2 years but maybe not")
try and keep in mind that if it doesnt work out its not Forever if that helps you not freak out as much. like, maybe yall stay to the end of the lease and split, or if yall have to split before than eh youre just starting the matching process over again. getting that thru my head helped me lmao
as for websites, yeah there are a ton of specific roommate matching sites you can use, personally I just used facebook and posted in a couple of local groups with a lil thing about myself and I got some matches p quick. I live in a largerish city tho (austin tx) so if you live somewhere smaller there might not be AS big of a pool. facebook as a whole sucks of course but the groups here and there are useful!
I posted both in a more general group and a queer housing group, and i said a lil more about myself in the queer group, but you can also use your post to explicitly or gently filter out ppl you dont wanna live with. personally i did purposefully mention being autistic offhandedly just to hopefully filter out ppl wholl be cunts about that (made a lil comment about "im autistic and a super picky eater, so i wont eat your food lol"), you can explicitly say you dont wanna roomie who has pets/smokes/etc, stuff like that.
(oh, also, if you have a long abandoned facebook acct/need to make a new one, that can sometimes look a lil sus so maybe straight up say "i dont use facebook but i can give you one of my other socials if you want to snoop")
look around the website/group for examples from other people on what to include (max rent, apartment layout prefs, area, whether you already have a place picked out or not and if you'd be willing to apartment hunt w someone, timeframe, etc)
and of course actually say a lil about yourself in the listing. I know thats nerve wracking and all but eh, people wanna have a vague idea of you beforehand. List some of your hobbies/interests, normal boring stuff like that.
talk about how clean you are. and how clean you want your roomie to be. neat freaks and gross ppl may be Incompatible. "i can keep the common area clean but my rooms gonna be a mess" was my thing, and roomie is sameish, which works out!
make a listing, in multiple places if possible, and both see who contacts you and browse other peoples listings. this is defo a time to get over that fear of being the first to say hi! if someone lists a super sweet set up at a good price tho and gets 20 likes dont be surprised if they dont respond lmao, might have a waitlist going
(OH YEAH and if u havent used facebook in 10 years be aware on mobile theres a separate messaging app and you might miss ppl messaging bc of the stupid "pending" tab or whatever. a lotta ppl in the group specifically also commented "messaged!" on posts ig to just say "HEY CHECK THE OTHER STUPID APP IF IT DIDNT GIVE YOU A NOTIF", i found it REALLY easy to miss messages for a bit)
SCAMS EXIST! be cautious, dont just send ppl a "$500 deposit" off the bat, make sure you meet people IN PERSON and preferably talk to whoever you're gonna be renting from (like the leasing office if its an apt complex, or just the landlord) first before signing whatever someone on facebook sends u
as usual meet ppl in person in public places like coffee shops and tell ppl where you're going espec if you're going to look at the rental etc etc, same safety rules for meeting anyone from the internet
if you got any responsible adults in your life (like parents/family/friends who have more experience renting) just talk shit thru w them. maybe they can literally help u look at any contracts if you're not used to reading them, or maybe just chat w them about how shits going so they can just be like "oh yeah that all sounds normal they sound cool" or "YEAH THATS A RED FLAG".
oh yeah, make sure you READ YOUR LEASE. i know we all just Agree To The Terms And Conditions all the time but yeah contracts should be read. even if you dont read every word at least skim it, make sure u read the big things like the money numbers (and stuff like uh. how much notice the apt requires on move out. recently fucked over by that! 🙃). check for extra fees and numbers that are different than discussed. dont just sign whatevers put in front of you!!
think about how much Stuff you have. are you moving out for the first time and have Jack Shit? well, you probs wont have conflicts like "whos couch do we keep?" which is nice. do you currently live on your own and have p much all your own furniture? might be a lil issue if your roomie is also established! just st you gotta work out with your roommate, and if nothing else you could always get a cheap storage locker to set aside shit you dont wanna get rid of til you know its gonna work out long term. if its st important, maybe say it in your listing. personally i noted in my listing "i got a big ass couch i dont wanna get rid of" and my roommate specifically contacted me like "oh yeah the couch is chill" so all twas fine 👍
and like. try to talk shit out w your roomie when issues arise instead of letting shit boil over. gotta get good at this myself!
sorry for being long and disorganized but those are just a few of the things that popped into my head lol, +anyone else w more roomie searching experience has any advice on the matter feel free to chime in! im not really an expert or nothin but also feel free to ask more questions, i can at least try to answer!
5 notes · View notes
bstu · 3 years
Text
Mod Log - September
Howdy! I thought this might be a fun little thing to do, both for my own desire to document, and for anyone who wants to tune in.
I’m counting on this to be a lax “series”(?) which serves as a catalog of minor experiments, mod progress, and bloopers that occured during a set period of recreational modding.
And maybe it is also a little bit self-indulgent - but gosh darnit, I will be enthusiastic about my dorky hobby! :p
Tumblr media
Item 1: Tests and Tribulations
Question: What happens when a Sim dies on a lot on which there is no physical place for a tombstone to spawn?
Answer: A tombstone... is not spawned! Verified by forcing an error and scouring the lot dump. This may lead to a Sim being in a “dead, linked, but no tombstone” state, without any mods (although the set up is a bit tedious - fill every tile with a diagonal wall or impassable object). Kinda neat!
Also, I made a statue out of Grim Reapers, pictured above.
Question: hey build/buy thumbnails are tiny can we like enlarge those
Answer: Yes!...ish.
Tumblr media
Unfortunately I was unable to find the parameter (singular? 🤞) that influence/s the grid layout within the UIScripts, meaning that (a) I just can’t see (b) It’s multiple variables making it more difficult to narrow down [c] This behaviour (that is, the automatic management of the geometry and populating of the grid) is exclusively executable-based so because of this all items overlap. :/
Pretty cool though how the actual thumbnails themselves adjust automagically to increased... ‘thumbnail... holder’... size. Also, I think the black transparency issue could be resolved with a properly sized UI images of the border to match. don’t mind the blue tearing that’s just me being silly
Item 2: Modunkles Spelunkles
This mod... is actually almost fully functional! Here is a video of it in action. Permitting your one-household Sims have a pool, they should no longer be doomed to a Death By Fire if noone extinguishes them... assuming they get there in time, and they’re happy with the risk of spreading the fire as they go :p
youtube
It’s not released yet, though, as I would like to add showers to the mix also, but that’s... tricky and likely to conflict with other mods out there. I also need to add compatibility for custom pool portals, and I still haven’t figured out the non-Destination version of this mod.
By the way - it seems to be impossible to add new functioning destination objects - I had to override a Maxis one! >:( (though this also seems like an excellent candidate for a plug-in framework to allow for multiple user mods. along with maybe showers).
Check out these bloopers though lol.
Tumblr media Tumblr media
And dang, look at this Actual Flowchart I Made to try and figure out the code beforehand. It looks better than my thumbnails fafasfafsa
Tumblr media
Speaking of a Plug-In Framework - I am working on one, at least for the mailbox, to make it easier for modders to do cool cross-compatible stuff with it. Planning to make something pretty in-depth with it!...eventually. Sims getting actually paid by the hour was a good start, but before I knew it I was rewriting half of CareerGlobals
so uh that’s on the backburner ._.;;
Did you know that there is a lot of redunancy concerning road textures in the game? It seems as though Maxis had more ambitious plans than what we received, likely due to being rushed [speculation]. With this we have quackery such as separate road textures/overlays being possible for different weather conditions, such as snow and hail, but in the full game this only being applied on road corners, but also almost none of the special textures are used.
Tumblr media
With some tweaking of the shader, though, I manage to make it possible to have separate road textures for light snow/heavy snow weather [pictured heavy snow overlay below]:
Tumblr media
This is not a road texture default - well, actually, for private testing purposes, I used textures from this creator’s defaults - but I have Voille’s True Neighbourhood Grass installed in the above screenshots, which comes with a road default. I also increased the fidelity of the appearance of the snow on the roads because it looks blurry af (no idea who thought 4 was a good value for number of passes over a cumulative <200 tiles in the unmodded game).
It is not yet released, though, because I want to (a) ensure compatibility with other popular shader mods and (b) create my own textures to redistribute. (although if anybody wants to create textures, feel free?? 😳) and [c] ‘c’ what can I do to make the neighbourhood coordinated with this system.
Really cool how this stub of a feature was just... there, though!
Oh, and a blooper from this set of tests.
Tumblr media
Nothing more Christmassy than a blood-red sky. Then again, I suppose it is October :p
Item 3: Fin
At the end of this draft now, and dang, this was really fun to put together actually! Even if this documentation is largely insignificant in the grand scheme of things I might do more of these in the future. Would be fun if other creators tried it too, I think! If you want to filter this tag, I will be using ‘bstu mod log’ for these sorts of post. Maybe I’ll make a dedicated page to these and post future ones privately? 🤔 Happy Simming! <>
77 notes · View notes
ilikemesometaetaes · 4 years
Text
Blithe (M)
Kim Namjoon Oneshot
Tumblr media
•••> Author: @ilikemesometaetaes​
•••> Summary: “Blithe (adj.) - showing a casual and cheerful indifference considered to be callous or improper.” In which you face the consequences of not paying attention to your not-so-innocent behavior.
•••> Pairing(s): Namjoon/Reader, slight Namjoon/Reader/Yoongi
•••> Requested by Anon: “I have a request for a one shot 💜 three words: namjoon, daddy kink 👀 (p. s. love u)”
•••> Word Count: 6.25k
•••> Rating: 18+
•••> Tags: smut | Established Relationship!AU (Engaged) | Fiancé!Joon | Namjoon!AU | Dominant!Namjoon | Submissive!Reader | Daddy!Joon | LittleGirl!Reader
•••> Warnings: smut, unprotected sex, masturbation, slight choking/strangulation, spanking (lots), dirty talk, slight bondage, Daddy/Little Girl relationship, Joonie is PISSED, but he’s also caring, cursing, pining, mention(s) of a threesome, immense teasing, rough sex, punishment time
Copyright © 2020 ilikemesometaetaes. All Rights Reserved.
Thank you for the request, anon! This was a bit to unpack for me, but here you go! I hope you enjoy :) And I love you too!
~#~
“But baby, we were supposed to stay in tonight.” You trapped the phone between your shoulder and ear, pausing your task of draining the pasta noodles in the titanium sink.
You were making a simple dinner for the two of you so that you could have a nice, quiet night dining on your balcony. Maybe get a little frisky and do the dirty over the railing afterward.
Your plans were completely smashed, however, when your fiancé called to cancel your plans, yet again, to work late.
“I know, my love. But I need to finish these layouts for Taehyung before tomorrow. You know how he gets if the displays aren’t in order in time.” Namjoon sighed audibly, to which you sighed with him in disappointment.
“Why can’t we just have a little bit of time together? I thought getting engaged would kind of organize our lives a little more.” You whined, dropping the empty pot back onto the counter. Just one night, God. That’s all I ask. Just one damned night with my husband-to-be.
Namjoon’s voice interrupted you, a beacon in the silence you received as a response to your plea.
“We’ll get our time. I promise, babe. Listen, I gotta go. Don’t wait up for me, okay?” You could hear his voice move away from the phone for a moment during his reply, a clear indicator that he was needed.
“Alright.” You replied dejectedly. The last you heard from him was a brisk ‘I love you’ before several beeps indicated the end of the call, taking away your opportunity to return the sentiment.
With a huff, you took your phone from your shoulder and lightly tossed it onto the counter in frustration- still mindful of breaking it, of course. He just had to work late again. On a Sunday evening. Right before your classes begun again. Of fucking course.
You were saying goodbye to the summer with a bit of an indifferent attitude; your “vacation” was filled with working a full-time job, worrying about bills, and getting engaged to Namjoon whilst a pandemic loomed over the world’s shoulders. To say that you actually had a summer was a bit generous considering all of the normal occurrences that were no longer considered “the norm.”
Despite your stressful schedule, Namjoon was always there to calm the storms brewing inside your mind. Since the moment you started dating freshman year, his words of wisdom and natural calming effect kept the worry from suffocating you.
You were always an over-thinker. Since you could remember, you worried about every single minute detail of your life. When Namjoon asked you to be his girlfriend across a table of the university’s café, you stared at him and waited for him to tell you that he was being facetious. Surely he didn’t actually like you, right? A man like Namjoon had no business wanting to date a girl like you- or so you thought.
“So…” You trailed off, coffee cup in your hand slightly dented from your tight grip. “You want me to be your girlfriend?”
You admit, your tone was a little monotonous and emotionless- an instant defense mechanism due to your belief that he was playing a cruel joke on you. Staring into his eyes through the lenses of his glasses, however, you only found sincerity gazing back at you.
“Y/N,” He reached out and placed his hand over yours on the cup, automatically soothing your grip on the poor thing. “I’ve liked you for months now. I’d honestly really like it if you could be my girlfriend.”
You stared at his hand over yours, loving the warmth and softness as it calmed your racing mind. He actually wanted you to be his girlfriend? Like, the type to hold hands and kiss and maybe fuck a little?
Oh good lord, how you wanted to fuck him.
Being friends with Namjoon was filled with positivity in everything except your sex life. Sure, you didn’t really have one being a double major and all, but that didn’t prevent your imagination from running away from you whenever you studied him too closely.
You’d stare at him from time to time, imagining nasty things that you would do with him, but it only left you aching and wanting with a very damp patch in your panties every time. You were thirsted to the brink of desperation, finding yourself close to downloading Tinder just to have a dick to fuck yourself onto. But no, even that felt like a betrayal to Namjoon despite his lack of knowing that you imagined sitting on his face almost every night.
So once you actually started dating Namjoon, to say you were nervous to get between the sheets with him was an understatement. You were fucking terrified. Numerous anxious thoughts filled your mind.
What if he doesn’t like my body? What if I cum too fast like I know I will and he gets disappointed? What if I’m too loud or too annoying? Oh god, I should probably do some ‘research’ on how a Virgo man like Namjoon likes his women in bed.
You didn’t have time to worry too much, because the very next week, you and Namjoon had sex for the first time- research and all flying out the window. He wasn’t soft and vanilla but he wasn’t a monster either. It was a gorgeous balance that you found yourself loving immediately.
Through the years, your sex life had remained exciting and utterly adventurous, always ready to try new things.
Tonight, an evil idea crossed your mind in your sexual frustration. You hadn’t had sex with Namjoon in over a week, okay? You can’t be blamed.
A small snack, shower, and a few glasses of wine later, you found yourself freshly shaven and draped across your black living room couch with a romance movie playing on the TV. You wore Namjoon’s favorite set of lingerie, preparing yourself in your wine-buzzed state of mind for your plan.
Grabbing your phone from the coffee table, you unlocked it and opened Snapchat to start a new chat conversation with Namjoon. You typed out your message to him and waited a moment before typing another when he didn’t open it immediately.
Babeeeeeeeeee
I’m hornyyyyyyy
Setting your phone back down on the table, you resumed watching the movie for a few minutes in wait, only to grow disappointed when ten minutes ticked by without a notification from Namjoon. Instead of waiting any longer, you picked up your phone again and decided to send him a video, double-tapping his name and readying yourself.
Once you held down the button to record, you put on your bedroom show.
The light from the TV cast the perfect glow on your body, emphasizing shadows on your curves and ridges, which did most of the work for you. You knew that he wouldn’t turn up the volume at work so you didn’t bother speaking. All you did was use your free hand to lightly trace your fingers over your skin, grasping your breast in your hand and lightly squeezing it through the black material of the lace bra piece.
After releasing the record button, you watched the video once, put a filter on it and watched it again, and then removed the filter once you decided that you didn’t need it. You watched it one last time with a satisfied smirk on your lips, sending it right after.
Carrying on with the photos and videos with the occasional cute or sexy message written in them, you grew upset by the fact that Namjoon hadn’t opened a single one in the last twenty minutes. Finally, you settled to touching yourself on camera and bringing yourself to the brink of a climax more than once only to deny yourself to make the allure of the videos even more difficult to resist.
You could only take so much before you grew irritated in your slightly drunken stupor, checking the time to find that it had been an hour since your first message to your fiancé. A groan of annoyance sounded from your throat and you finally gave up the patience to have some sexy time over the phone with him. So much for new things. I thought we were going to have a use for phone sex more often.
Tossing your phone to the other end of the couch, you continued to busy your hand on yourself, picturing Namjoon as the one touching you- as you always did on lonely nights like this one.
Once you finished the last drops of your wine, you took the bottle to the kitchen and dropped it into the recycling bin before heading to your bedroom with sinful thoughts in mind. Stripping yourself of the uncomfortable garments, you collapsed into the bed and got comfortable in preparation to finally finish yourself off.
Completely unaware of your phone lit up with a string of missed calls and snapchat notifications in the living room, you brought yourself your orgasm. As unsatisfying as it was without the help of your fiancé, you still managed to be relaxed enough to turn in for the night with the wine pairing in to send you off. You sighing contently despite missing your other half.
_______________________________
Namjoon was furious as he drove home well over the speed limit.
He remembers the exact moment his switch was flipped.
His phone was bribed with elongated vibrations in his pocket, a sign that someone was messaging him on Snapchat, as he stood over the planning table. Upon a brief glance at the screen, once he pulled it out, he saw that it was you. Being notifications on Snapchat instead of regular text messages or calls, he knew the issue wasn’t an emergency.
Instead of opening them, he went right back to work after turning on ‘Do Not Disturb.’ He was working extra hard to clear up his schedule for the next few days, knowing that you would appreciate the extra time he put in once he was able to stay home for you. So he needed to stay focused.
Of course, he would be staying home for himself too.
Namjoon longed to have you in his arms. Longed to hold you and touch you and feel your skin on his. Namjoon felt his slacks grow slightly tight as he let his imagination wander from him. The last time he had sex with you was over a week ago. Could you blame him?
Shaking his head to rid himself of the thoughts so that he wouldn’t get hard in the middle of his office, he went back to work.
It wasn’t until an hour later when he finally sat in his chair to take a break.
“Hey, Namjoon?” A voice called him from his state of relaxation, prompting him to look at the source of the voice.
Min Yoongi stood in the doorway of his office, slightly shaking and shifting uncomfortably in his spot. Namjoon quickly stood up and approached him with concern for your friend.
“What’s wrong? What happened? Are you alright?” Namjoon fired at him, grabbing onto his shoulder. Yoongi looked down with a slight blush to his cheeks and Namjoon raised his eyebrow expectantly.
Instead of replying- he wasn’t very good at voicing embarrassment- Yoongi lifted his phone that was clutched in his hand and turned it so that the screen faced Namjoon, displaying a picture of a very familiar body clad in a very familiar set of lingerie with a hand placed over her core.
That’s Y/N. Namjoon’s blood ran cold.
Across the bottom of the screen was a sentence in the snapchat text box that read: ‘Come home soon, Joonie. I miss you… obviously lol’
For a split second, he thanked whatever god was looking out for him that the picture was intended for him, but the relief was swiftly replaced by jealousy and anger once he realized you accidentally sent a photo of yourself to his coworker. He understood that you and Yoongi talked- and that you were good friends- but his jealous side loomed over his head because he was the only one allowed to see your body.
The older man noticed Namjoon’s change in demeanor quickly, knowing that the younger man was upset. Yoongi was fast to defend himself.
“Namjoon, I swear that I had noth-“ Namjoon was quick to interrupt him.
“Yoongi, you did nothing wrong. Just forget the picture ever happened, hm?” Namjoon couldn’t pretend to not notice the way Yoongi’s smaller and very obviously nervous frame slightly peaked his interest.
“Of course.” Yoongi nodded and tapped on the screen so that it would disappear.
As Namjoon turned back around and went to sit in his chair, Yoongi perked up.
“I know that you told me that the two of you have been trying new things and- forgive me if I’m overstepping-” Yoongi gulped and toyed with his phone case, unable to maintain eye contact with his coworker. “But, uh… if you ever want a third-” Namjoon cut him off again before he could continue, thoughts already heading towards the subject that the older man was addressing.
“Noted.” He said curtly. “We’ll consider it.”
Namjoon saw the small smile at the corner of Yoongi’s lips, fighting the urge to smile with him. “Thanks, Namjoon. I’ll take my leave now.”
“Very well.” Namjoon bid. “Please close the door behind you.”
Once Yoongi left and enclosed Namjoon in his office, Namjoon sat back in silence for a moment, attempting to control the storm in his mind. Pulling out his phone, he gawked for a moment at the amount of notifications from you.
Snapchat
26 Notifications
Why would you message him so many times? You know that he’s busy. Regardless, Namjoon took this time to open them.
And he watched every second.
So yes, Namjoon was still furious when he came home to find you fast asleep in your shared bed, stark naked and sprawled out.
He tried calling you, snap chatting you, texting you; he tried everything to contact you so that he could tell you that he was on his way home. To no avail, his efforts went unanswered only to discover that exhaustion had won against you.
He couldn’t blame you for being needy. He couldn’t be angry when you laid there so damn cutely. Namjoon knew that you were just as desperate for him as he was for you.
But he could blame you for not paying attention and sending a thirst trap to someone who wasn’t him- even if it was someone who could potentially be involved with the two of you later on.
So yes, Namjoon was furious.
_______________________________
A stinging pain burned your ass, jolting you from sleep with a start.
You yelped, body whipping around to address the sensation, only to be grabbed and held with your back tightly pressed up against another body, restrained by arms circling your waist. One arm nudged itself underneath your breasts while you stood on your knees.
Namjoon. You immediately recognized the feel of him, sighing with relief. Your heart calmed with your body as you slumped back against him.
“Why’d you do that?” You whined, relaxing your neck back to rest your head on his shoulder. His breath brushed the side of your face and trailed down your naked chest. “That hurt.”
“Because someone decided to be a naughty little girl.” He growled against the shell of your ear, teeth nipping at your cartilage. You instantly became hyperaware of the bulge pressing into your naked ass, a shock of hot desire cramming itself straight into your clit in a throbbing pulse. You quivered softly.
“I needed you so much and you never came.” You whimpered as he moved his mouth lower to suckle on the skin on your shoulder.
“I know, darling, and I’m sorry. I did tell you I was staying late, though.” He tightened his hold around your body, hands curling into the flesh of your waist. “You should have listened.”
You shifted in his hold, attempting to escape it so that you could face him, but he wouldn’t let you move. Your naked body was hot with desire and he kept you bound to him tightly.
“I wanted to listen. Believe me, I did. But I wanted to do something good for the both of us.” You raised and arm to curl around the back of his neck, wanting more intimacy and closeness. “Those pictures made me feel good.”
“Did you want Yoongi to feel good too?” He said menacingly in your ear. Confusion flooded you, eyebrows immediately furrowing.
“What?”
“I said-“ Namjoon raised a hand from your body to grip your jaw in his grasp, dragging your gaze to his. “Did you want Yoongi to feel good too?”
“Joon. What are you talking about?” You were concerned, wondering why he was getting so worked up.
Were you talking to Yoongi too much? Namjoon was never jealous over your friendship with Yoongi. He was nice and kind to the both of you. Although more on the quiet side, he seemed to fit in quite nicely when he was around you and your fiancé.
“Seeing how you’re acting like you don’t know any better, I’ll treat you like you don’t know any better, little girl.” He growled again, anger obvious. He released his hold on you and pushed you forward. “Elbows and knees. Ass in the air. Now.”
You scrambled into position, excitement coursing through your veins as the adrenaline spiked your heart rate once again.
Hands trembling, you gripped the bed sheets in anticipation, biting your lip. The sound of Namjoon’s belt buckle coming undone and his trousers hitting the floor only caused the heat in your core to increase tenfold. The bed dipped down shortly afterwards and you craned your head to peak at his partially-undressed body with boxers restraining his cock. A short smack was delivered to your thigh, followed by a curt statement, “Eyes to the front, brat.”
You obeyed his command immediately, feeling him slide into a kneeling position with his legs below your stomach.
“Lay across my legs.” He murmured, hand lightly pressing down on the small of your back where it was arched. You lowered your body, draping yourself across his lap while attempting to stop your body from vibrating with pure joy. His hand slid to your right ass cheek, rubbing tender circles into the skin.
“You think it’s okay to share yourself with others?” A sharp sting licked its way across your backside, force jolting your body forward and pain eliciting a whimper from your lips, yet you couldn’t help the clench of your cunt with the sound of Namjoon spanking you incredibly loud in the quiet room.
Namjoon’s hand was quick to soothe the pain, resuming his ministrations over the afflicted area.
“No.” You wavered. Another smack, softer this time, was delivered. A yelp slipped past your lips as your body reacted to the delicious pain.
“You will address me as daddy from now on, understood?”
“Yes, daddy.” Your vocal cords struggled to maintain balance with your breathlessness, resulting in your response coming out as a whisper. Namjoon’s hand clapping against you was unexpected, pain scorching against the now-tender skin. The sensation of your hot skin slightly raising made you mindful of the fact that you would definitely bruise.
“What was that?” He asked. You tensed as his free hand slid to enclose your neck in its grip, tightening.
“Y-yes, daddy.” You said with a bit more volume despite the pressure on your trachea. Namjoon released his grip but left his hand placed on your throat.
“Good girl,” He cooed lowly, shivering at the new name that you called him. He liked it very much. “Very good girl.”
You couldn’t help but bristle proudly under Namjoon’s compliment, juices now beginning to slightly trickle down from the apex of your thighs.
“Elbows and knees.” Namjoon directed as he removed himself from below you and took away much of the heat you were feeling. “Let’s talk.”
You stared at the bed in confusion. Why were we talking now? You thought he was going to fuck you.
“So,” He began from behind you. “If you know that it’s not okay to share yourself with others, why did you share your body with Yoongi?”
What.
“Namjoon,” You turned your head to look at him seriously from your position, breaking out of the tense moment. He stood a few feet away from the bed with his black work shirt unbuttoned and rolled up at the sleeves, pectoral muscles peaking from in-between the split. The sight was accompanied by the slight appearance of a nipple and his toned abdomen. “What in the fuck are you talking about?”
“Eyes to the front or I will fucking strap you down right now.” His reply, brimming with fury and warning, was no match for your concern.
“Namjoon.” You grit out with a fiery gaze. “If you think that I chea- Joonie!“
You didn’t get a chance to finish your statement because Namjoon moved toward you and pounced, engulfing your body with his own. Your strength was no match for his weight on top of you, causing both of you to collapse to the bed. Swiftly, Namjoon grabbed both of your wrists and held them down. You automatically turned your head so that your face wouldn’t be pressed into the mattress.
“I fucking know that you didn’t, Y/N.” Namjoon graveled through his teeth into your ear. His lips just barely ghosted over your ear lobe. “But you did do something naughty.”
His hand slid below your hip to your core, harshly cupping it and forcing a groan from deep in your chest.
“Tell me,” Namjoon let a single finger press between your folds, the minimal sensation warranting your body to shudder again. You shifted your weight so that you could arch your back and give his hand more room to work underneath you. “When you were sending me the photos, did you really pay attention?”
“Nam-“ His grip on your wrist served as a reminder of the name he wanted you to call him. You corrected yourself quickly, back in the mood. “-Daddy. I did, I swear.”
“Are you sure about that?” His finger began trailing up and down your slit, bringing some of your wetness over your pussy lips. You needed him on your clit, desperately.
“Y-yes, daddy. I’m sure. I remember everything I said and everything I did for you.” You pressed your backside into his pelvis as you arched your back, feeling his clothed dick slightly separating your ass cheeks.
“Stop moving.” He commanded. You froze on the spot as he continued to toy with your juices. “And I guess you really don’t know what you did, huh?”
“Daddy, no.” You keened as his finger dipped into your depths, pushing through your slick walls to nestle against your sensitive spot with ease. Softly and lightly, he stroked it, sending your mind into a horny stupor.
“Then I guess I’ll just have to teach you to pay attention. Sending a photo of you touching yourself to Yoongi isn’t a mistake you can make.”
His finger left you instantly, along with his body, as you were left to think about what he just said.
Yoongi got a photo of me? How in the- Oh fuck. Namjoon must be livid.
Almost as soon as Namjoon got off of you, he was grabbing you and flipping you over, evoking a short scream of surprise at being manhandled so abruptly.
Now, with an unobstructed view of him, you were rendered mute by the way Namjoon’s daddy persona exhumed a physical change in him. As he slid his shirt and boxers off of his body, you were trying to find the words to say in response to his statement, but you were terribly distracted by bulging muscle and his delicious stature along with an expression of reprimand gracing his facial features.
Before you could even attempt to discuss the issue, Namjoon was picking up his slacks from the floor and sliding his belt out of the belt loops whilst he spoke again.
“Put your wrists together and spread your legs, brat.” He approached the bed with his belt in hand, watching you eagerly obey him with a slight smirk pulling up the corner of his lips. Namjoon used his belt to bind your wrists together while you struggled to suppress the elation from the thought of getting fucked while restrained.
Once he had the belt wrapped around your wrists, he grabbed it and pushed it down to the bed with your arms having no option but to follow. He leaned down over you with your arms so that he could come face-to-face with you.
“Pay attention to me fucking you. I’m sure you’ll have no problem with that.” He rumbled. You felt his breath fan over your face which was, with no doubt, displaying your anticipation.
Namjoon looked down for a moment as he grabbed his dick with his free hand to rub it against your parted lips. Your slick was already pouring out of your depths, gathering on the head of his dick when he passed it over your opening. Nudging your clit only served to arouse you further into insanity. You tipped your head back in preparation to be filled.
A sharp slap on the inside of your thigh made you snap your head back up to look at him in question.
“I told you to fucking pay attention.” His voice rose slightly, making you feel like you were indeed about to be reprimanded for getting distracted.
“Yes, daddy.” You whispered, casting your eyes down to where your bodies were about to join. He followed your gaze shortly after, continuing his massage on your core.
Your heartbeat picked up instantly when he placed himself at your opening.
“Watch me fill this little pussy.” He murmured before sinking into you. The weight of his hand holding your arms to the bed lessened as he removed his hand from his dick and placed it on the bed to support himself while he moved.
You whimpered quietly at the feeling of him pushing into you so fast. The stretch burned slightly and you shifted your hips uncomfortably. Namjoon leaned down and pressed his lips to your jaw.
“Sh, darling,” He whispered soothingly. “I got you.”
With your view of him slowly rearing back and entering you interrupted by his body, you decided to let your head fall back again to help accommodate the subsiding pain. A few more pumps of his dick later and you were only feeling bliss with hopes that he would speed up soon. Your small moans keyed Namjoon in on the fact that you weren’t uncomfortable anymore, warranting him to lightly nip your neck and sit up. You followed his movement with your eyes.
Namjoon looked down at your already-wrecked form, staring at you heatedly. You couldn’t fucking breathe past the lust that filled your veins when he was looking this hot and in charge- this daddy-like. Breath held in wait of his next move, you saw a smirk grace his lips, causing your walls to constrict around his girth.
In response to your excitement, he pulled your bound hands back up and slid them over his head, looping them behind his neck. Then, he slid his arms underneath your thighs and picked you up, carrying you with your legs spread open in his lap.
“Now watch me fucking destroy you.”
You cried out and dug your fingernails into your palms as your fiancé raised you up and dropped you onto his dick, impaling you deeply with it. Before you could even fathom how far inside you he was going, he repeated the action again.
Namjoon began at a vicious beat, your body subjected to letting him control you like a doll. His warm, brown eyes were locked on yours as he fucked you, holding your ogle intensely and preventing you from looking away- even as you fought the urge to let your eyes roll back into your head.
His dick pumping into you had your toes curling. Every time he bottomed out, he pulled your legs closer to his body to touch his chest against yours. Despite his tight embrace, you could barely stay straight up with the sensations he was giving you.
“You know you only belong to me, right little girl?” He leaned forward and pressed an open-mouthed kiss against your neck, sucking in the skin to bite down. Once he released it, he laved his tongue over the affected spot and moved to get to work your shoulder.
A particularly hard thrust had you screaming your response, head craning back in ecstasy. “Yes, daddy! All yours!”
With his arms below you and his hands clutching onto your backside, Namjoon had easy access to deliver another spank in the same spot he had spanked you minutes before. You howled out a cry with tears welling in your eyes despite the pain adding to the pressure building between your hips.
Unable to find another way to let out your automatic instinct to pull your fiancé close with your orgasm approaching, you resorted to pulling him by his neck with your bound hands, kissing him sloppily. Hopefully, he would be there to catch you when you finally fell to the throes of your climax.
“Daddy,” You moaned against his lips. “Gonna cum.”
And then he stopped.
Movement ceased. Friction stopped. The battering inside you came to a halt and you looked at him with panicked eyes, desperation controlling every aspect of your mind once your orgasm was completely and absolutely denied.
“Oh? You’re going to come? Without asking?” He pulled away and smirked at you with an eyebrow cocked.
“Daddy, please. I-I need it.” You dug your face into his neck, attempting to move yourself on his dick to regain some of the mind-numbing sensation.
Namjoon only laughed in response. “Oh? You need it? How badly do you need it, darling?”
“So bad. Sososo bad.” You were rambling- begging shamelessly- now while tears began to trickle down your face and onto his skin. “I need you. Please.”
Namjoon dropped the two of you to the mattress, allowing your legs to fall to the sides. With your hands still bound, you pulled him down to you so that you could kiss him again but was left confused when he resisted.
“Nuh-uh.” He clicked his tongue. “You want it? I’ll give it to you.”
Before you could even ask, Namjoon was removing your hands from around his neck and flipping you over. You immediately raised your ass and arched your back excitedly.
“The little girl is ready for me, isn’t she?” Namjoon rumbled out a laugh, placing a hand on your ass. You flinched slightly at the contact seeing as you were expecting another smack, but you couldn’t even answer because, quickly, he swiped his thumb over your exposed pussy. Namjoon loved the way it was widened by his dick. “Oh, look at you all fucked open by me. Just wait until I fill it up.”
“Please fill me up, daddy.” You pleaded, forehead pressing down into the mattress.
“As my little brat wishes.” He acquiesced to your request, pressing his dick between your spread ass cheeks in ready.
You weren’t expecting him to act on it so quickly, thinking he would tease you some more, but you only moaned into the sheets as he entered you again. The previous fire in the pit of your stomach that burnt out those few moments ago was quickly rekindled. His hands clapped into a vice-like grip on your hips, fingernails digging into the flesh and surely breaking the skin, as he began his pace all over again.
“D-“ A savage thrust interrupted the whimpered word, shooting your body forward. “Daddy.”
Namjoon was reaching a new depth and angle within you, and when his dick began directly pummeling that oh so sweet spot inside of you once again, your brain might as well have reset and kick started a speed race towards your orgasm.
You couldn’t even focus on the way he was fucking into you when his own grunts and moans of pleasure were filling your ears nor the way your orgasm seemed to have come upon you within moments due to your oversensitivity from a denied orgasm.
“Daddy, please let me come. I’m gonna cum. Gonna cum.” You chanted, feeling numb whilst tightening your entire body in attempt to control your body during climax. You almost didn’t feel the sensation of your fiancé grabbing you by your waist and lifting your body so that your back could meet his chest.
The clapping sounds of your bodies only got louder and the squelching sounds of your pussy eagerly taking him in only got more sinful from the new position. With your arms in front of you, you had no choice but to loop them back around Namjoon’s neck behind you.
“Cum, little girl. Cum all over my cock so I can fill up your pretty cunt.” He growled. He removed a hand from your hip to place it on your jaw so that he could turn your head o face him. Your eyes fluttered as you felt your walls begin to seize up and he took this as a sign to quickly cover your mouth with his own.
The inferno of pleasure within you grew too hot and burst moments later, your body seizing and jerking with each of his pumps into your tightening body. Hissing through his teeth from the sensation of you squeezing yourself around him, Namjoon attempted to swallow your screams with his lips whilst chasing his own high.
“Fuck,” He ground out. “Fuck, fuck, fuck.”
Namjoon’s climax followed shortly after yours, pressing his hips into your ass with as much pressure as he could muster to ensure that his essence painted your walls as deeply as possible. Groaning with his release, he laved his tongue over your lips and into your mouth sloppily.
The two of you, spent and breathless, didn’t stay in your position for long. He knew that you were uncomfortable and that your wrists were probably going to bruise. The roleplay was over and there was no need to keep you restrained anymore.
Pulling out, Namjoon watched as his cum streamed down your thighs and onto the bed. You grimaced at the unpleasant sensation and the fact that it was now soiling the bed.
He got up quickly, smiling, and after rolling over onto your back with exhaustion, you watched the beautiful grin spread across his lips with dimples in his cheeks. You couldn’t but smile blissfully in return.
“I’m not actually mad at you, my love. You know that, right?” He grabbed the wipes from your bathroom as he spoke.
“Oh, I know. But it would be really hot if you could pretend to be mad a little more often.” You giggled, widening your legs for him as he cleaned you up. “That whole ‘Daddy Joon’ thing suits you incredible well.”
“Oh, does it now?” He snickered while reaching for the belt. “Hold on, let me undo this.”
Once the belt was unwrapped from your wrists, you rubbed them soothingly. “Ow.” You muttered.
Namjoon balled up the wipes and threw them in the trashcan. Once he was done, he picked you up bridal style and carried you from the room.
“Where are we going?” You questioned.
“To the kitchen.” He laughed heartily. “We have a pasta dinner to eat.”
“But I need to put clothes on!” You protested. He only placed you down in front of the counter before walking to the fridge, completely butt-naked. He just kept laughing.
“We’re in our own house, Y/N. No need to worry about trivial things like clothes.” He pulled out the Tupperware that you packed the noodles and pasta sauce in earlier while you watched. Shrugging, unable to argue with his reasoning, you turned to grab the plates and silverware from the cabinet.
“Oh, by the way,” Namjoon set the noodles in the microwave and set it to warm them up. “Yoongi asked us if we wanted a third.”
You paused in shock, turning to look at him. His form, even in normal lighting, was mouthwatering to look at. Broad shoulders sat upon a wide chest graced with lean pectoral muscles. His biceps, bulging with light ridges of veins running down to his hands, had gotten bigger in the last few months. When he smiled, allowing his dimples to dent his cheeks, there was no way any woman would be able to resist him.
And you were his woman.
“Yoongi?” You drew up an eyebrow at the thought, remembering that you had sent him a photo of yourself by accident. You also remembered Yoongi to be a very calming and relaxed man who was very easy on the eyes. He was your friend, after all. “Really?”
“To be honest with you, I’m kind of considering it. It would be exciting to try having a third.” He leaned against the counter with his hands gripping the edge.
“I thought you wanted me to pay attention to you and only you.” You laughed incredulously.
“Well,” He stalked towards you and placed his hands on the counter on either side of your naked body, leaning in. He was so close that you felt the body heat radiating off his skin. 
“I can make certain exceptions to your behavior.”
~#~
If you’d like to read more of my work, feel free to check out my Series Masterlist! If you’d like to read my first fic, check out the DHYB Masterlist!
416 notes · View notes
starrysupercell · 3 years
Note
Silly idea I just thought of: somehow, certain Brawlers lose the ability to lie. The cause could be as innocent as Jessie testing out a new Truth Ray, to something like Starr Park deciding that there needs to be more transparency between brawlers. Whatever the reason, there will be Shenanigans abound
Tbh this sounds super fun, >:) so, of course I'm gonna go into detail on some of them.
(This could be a whole story. Mind the messy layout.)
Brawlers who have to worry the most for business/socially/jobs: Piper, Byron, Belle, Griff, Mr. P probably?, Ruffs, Barley, Gale and, to a lesser extent, Lou (towards Mr. P),
Brawlers who have to worry emotionally: Stu, Penny, the whole Retropolis Gang, Edgar, Mortis.
Brawlers that would be fun if they were hiding something deep, deep down: Bo, Nani, Amber and/or Primo.
(Brawlers who are sus and would be more nervous about this than they should be: 8-Bit, Spike, Poco, Bea, Mike.)
~~
No more sneaky gossip for Piper, and to a lesser extent, Emz. Piper could hardly speak to anyone since she loves weaving so much secret details in her words. I wouldn't call her "fake" because she genuinely enjoys company and has friends, but.. well, you've seen how I've written her. She's just... opportunistic.
Anyway, I'm sure it was in the middle of a conversation that ended badly. I wonder with whom?
~
Byron can't pitch sales for the time being. 😈
Customer: Well how do I know it works? Is it safe?
Byron: my good sir, I can assure you that...it's a highly experimental concoction. I've never used it myself because I would never be a lab rat to my own mixtures, but I have gotten a few constant test subjects around the park. Besides which, I have the utmost faith in what I'm doing. Even if there have been several unfortunate incidents in the past, I'm undeterred with my skill. Mainly because I'm beyond compare in my abilities but I also know I'm never the one at risk. Hahaha....
Byron:
Customer:
Byron: ...why did I say that?
~
Sadly Barley is unintentionally rude to several people too. Since this hypothetical truth ray/correction would prevent anyone from keeping their thoughts to themselves, he answers and comments with no filter. Several people (Rico, 8-Bit, Shelly, Bibi, etc.,) find it hilarious, Barley does not.
~
I truly wonder if the honesty policy also seeps into not only verbal truth, but making somebody avoid anything that's not "Honest" Work?
What I'm saying is, Belle can't even plan heists or delve into thinking up ways to sneak around.
Cue her announcing herself in the midst of a Robbery, ruining the plan and trying to turn herself in. (Unaffected members of her Gang might be able to get her out of there.)
Or, more ridiculously, that "This Pen Is Blue" scene from 'Liar, Liar' with her trying to sketch out a heist.
Maybe this one is a stretch? I'm not sure, but it is for fun.
~
Ruffs already has a hard time hiding his tail wagging. He's a serious guy who wants to be taken seriously, but now everyone will hear how proud he is of Squeak and how great a friend MXY Kit is to him, and how soft his heart actually is. Which, fine, maybe everybody already suspected, but it was never confirmed until now.
In short, gruff exterior dog is actually fuzzy, but it wasn't that deep down.
~
THE RETROPOLIS GANG, EDGAR AND PENNY.
1) Bull with his tough guy attitude would have trouble verbalizing mushy stuff. Crow just plain doesn't want to. Bibi is a mix of the two. She's naturally tough, and she doesn't have practice. Imagine it-- the tough gang on the block sharing emotions with each other and being buddy-buddy with people they're fond of! After the ordeal, they agree they need some time apart.
2) Penny is emotionally constipated because she leaves the bad thoughts locked in a chest. Also, she was raised by robots, so it's a little difficult expressing herself... but now she can say exactly what's on her mind! ...if she can even sort through her feelings. The truth device makes you unable to lie, but can it get you to know what you're feeling?
Penny: Holy shit, this is way too philosophical for me, my head hurts, please make it stop
Jessie: D: I wish I could help you!!
3) We all know about this tsundere emo boy. He greeted Colette with a "Hey, Colette. It's really great to see you today. I had a bad morning and you always brighten up my day." And they both knew something was up immediately. Now, as everyone is trying to resolve this, Edgar's Scarf is wrapped tightly after his mouth tightly, lest he says anything else, like how cool he thinks a few certain other Brawlers are, like Shelly, Crow and Bibi. Or how he looked up to and misses
Sorry, he parkour-ed away before he finished that sentence :)
~
....Stu won't be able to handle this, will he 😔
Stu: Oh, I'm not s-s-sticking around. Rebuild me-e-e when this t-t-truth nightmare is over🤘
Pam: Rebuild? But you aren't--
Stu: *falls into a pile-- he force shut himself down*
~
People who weren't affected because they're already 100% honest: Jacky, Sprout. That's it. They're the only honest folks here. Everyone else has something to hide.
~
I think that's about all the ideas I have for the Brawlers.
As for the cause, I like the idea of it being "Starr Park." If they thought complete honesty would work in making things running more smoothly, they thought extremely wrong. In fact, Happiness is dipping at an alarming rate. Clearly, this decision has to be reversed.
If it were Jessie, there's a more peaceful way to resolve this situation, and it started in a more innocent way too. That is, she made a truth ray for fun, but didn't think to make an option that reverses it, so she works on a "Lie Ray" as fast as she can while everyone suffers. (Yes she feels guilty.)
15 notes · View notes
kilojulietsierra · 3 years
Text
Seis Dias - Prologue & Chapter One (Frankie Morales x OFC - Triple Frontier meets Six Days Seven Nights)
I watched Triple Frontier and Six Days Seven Nights in the same day awhile ago and... this happened over the weekend lol
It was a lot of fun to write and I hope y'all enjoy it too!
Notes - my Spanish is a work in progress, if there are any mistakes they are mine. Rating is lower than usual for me (T - on Ao3) but I have an idea for a bonus chapter at the end that would bump that up. Canon typical violence and language.
Tumblr media
~~~~~ Summary~~~~~
A well known photographer on vacation with her new fiance just got called in on a once in a lifetime, last minute job for one of her biggest customers. Promising her fiance that it'll be a quick 2-3 day trip from the south american resort they're staying at to the job and back. With an overnight bag, her camera and a bribe for the... quirky pilot that flew them to the remote vacation spot, she takes off to the shoot.
A storm rolls in while they're in the air and the quick trip takes a dangerous turn.
Forced to land in the middle of the night when lightning strikes their plane the pair find themselves in the middle of the South American jungle with a wrecked plane and no way to get help and no way out of the jungle but to work together.
They survived the crash but that's the least of their concerns, the jungle has more than one danger lurking in its shadows.
~~~~~~ Prologue`~~~~~
Joanna was grateful to be out of the slush and snow but her annoyance with the February weather soon turned to annoyance towards the crowd of people in the lobby which she had found her shelter in. She shoved and excused her way through the frigid New Yorkers to the front desk, "Hi, I'm here for an appointment with," She was cut off by someone knocking into her camera bag, causing her to sway on her feet and clutch at the strap to keep it from slipping, "Excuse you. Anyway, Robin Monroe? Can you let her know I'm here"
"Floor seven, elevator bank is to your right." The receptionist had no clue that Jo had been here a dozen times already this month. She only glanced up to point to the general direction of the elevators as she reached for the phone receiver.
"Thank you." Joanna squeezed through the gap in the crowd and made a beeline for an elevator just opening. Her and the other elevator riders stood in silence, slowly filtering on and off as the floor numbers climbed. At the seventh floor Joanna took her leave and soon heaved in a deep breath at the wonderfully empty foyer of Ms. Monroe's publication office.
Making her way through the desks and design tables Joanna waved and greeted the familiar faces until she came face to face with a photo shoot set up in complete chaos. Backdrops set in disarray, layout mock ups scattered on the floor, makeup and hair assistants scurrying back and forth and in the center of it all Robin trying to direct the melee. "So... how's your day going so far?"
Monroe turned around in a snap and visibly sagged "Oh Joanna, you'll never believe!" She fell into the long and winding story of how the talent for this particular shoot had fell through and now everything, absolutely everything, was a disaster.
Joanna took a deep breath, situated her camera bag on her shoulder and pulled out her phone to shoot her boyfriend a quick text that she would probably be late getting home tonight.
Later when everything had calmed down and the shoot was completed, a success as far as Jo was concerned, Robin walked her to the foyer where one of the assistants met them with a huge bouquet of flowers. "These came awhile ago for Jo." The young girl informed them, giddy to see what the card said. "They're from Kyle," She grinned and bounced on the balls of her feet while Robin inspected the exotic flower arrangement.
Jo read aloud, "A surprise after a long day, love you, Kyle." She flipped the note over to find a reservation card for one of her favorite restaurants.
~~~
"Fancy flowers, fancy restaurant, what's going on?" Joanna teased as the hostess guided them to their table.
Kyle rolled his eyes, "Don't ask questions, it'll ruin the surprise."
Kyle was a handsome young man, tall and lean, blonde close cropped and perfectly styled hair, bright blue eyes and a worked as a shockingly successful stock trader for someone his age. He and Joanna made a striking couple and they both knew it. Especially Kyle.
Once they were seated and had placed their drink orders Jo pressed again, "Ok, you know I'm not a patient woman Kyle. What's up."
"Okay fine," he chuckled as he reached for the inside pocket of his suit jacket, "Close your eyes."
Jo balked slightly but at his insistent stare, did as he asked. When she was finally allowed to open them she gasped.
"Two weeks from now, you, me and six days, seven nights in paradise." Kyle swiped through pictures of an out of this world, boutique, trendy, South American beach resort."
"Oh my God." She watched as he swiped through the promotional photos; lit, edited and laid out in such a way that she could nearly feel the sand under her toes and the sun on her skin. When he put his phone away she turned to face him, "Kyle, you're not serious! That looks amazing! Are we really going?"
"We're really going. You always say you miss travelling and that I need to take more time off so... tada!" He said with pride and matter-of-factness that was his trade mark. "Are you excited baby?"
"So excited." Jo leaned in to give him a kiss and mentally begin counting the hours.
---
Day One
When they landed in Bogota Joanna swore that she felt a weight lift and her mind clear. All she could think of was being able to enjoy herself, truly, for the first time in a long time. She reached out and grabbed Kyle by the back of his shirt, "Wrong way." As he turned outside the terminal towards security and away from where they needed to go, to collect their luggage and then towards the charters.
"What?"
"Seguridad." she laughed and pointed at the sign he was about to walk under, "We want maletas, and then we have to find the charters, she pointed in the opposite direction. "This way."
Without saying anything he trailed along as she led the way, following the signs, correctly this time. Eventually they found themselves walking thorough the doors and onto a paved tarmac where two men where leaning against a small plane chatting and laughing.
"Disculpe me,"
Jo approached them and Kyle muttered under his breath."I always forget you can actually speak Spanish."
Joanna ignored him. The two men by the plane glanced up as Joanna continued, "Ayudame, por favor? Estamos buscando por..." she paused to pull up the name of the charter service, "Aire Tropical?"
The two men stood up a little straighter, the taller, scruffier of the two cocked his head as he looked her and Kyle over. "Well you found it." He said in a very American accent. He was tall and broad, his arms bulged slightly through the sleeves of his button down shirt. His jeans were faded and worn, so were the cowboy boots on his feet and the Standard Oil cap on his head. He slapped the other man on the back and then stepped up to Kyle and Joanna. "Franciso Morales." He extended his hand to Kyle and then Joanna, "Mucho gusto."
"Mucho gusto," She offered a small smile and was glad to see it returned.
"So you're the pilot?" Kyle asked, incredulous.
Franciso pulled his worn out cap off his head, ran his hand through his shaggy hair and placed it down again, "Umm, yeah."
"And you're American?"
The other man scoffed, short and silent, "Yeah, for the most part anyway. If you're ready to go, I am." He glanced over his shoulder to the plane.
"Great," Kyle interjected before Jo got the chance, "Could you grab the bags?"
Franciso looked to Kyle, his head cocking to the side again as he chewed thoughtfully on a piece of gum.
Joanna cringed, worried Kyle had offended their only ride to paradise.
His eyes jumped from Kyle to Jo and then back. When he smirked it was not in the pleasant friendly way it had been when they shook hands. "You bet."
After the pilot, Francisco, had grabbed their bags and took them to the plane Kyle pulled her aside. "I'm not sure how I feel about this hillbilly flying us anywhere."
Jo smacked his chest with the back of her hand, "Kyle." She glanced towards the pilot to see if he had heard, "He works for the resort. It's fine."
A shrill whistle interrupted them. "Angelica, vamanos!"
A leggy woman with perky breasts and a big smile came bouncing out of the charter hangar. 'Coming!" She giggled as she joined their little group, "Hello!" Her accent was thick and not from South America but Jo couldn't place it. "You must be the couple coming to the resort. I'm Angelica, I work their and I promise you are going to love it!"
For a brief moment Jo doubted that was true, but beside her Kyle was nodding enthusiastically.
~~~
The flight went perfectly well and Jo couldn't stop leaning to look out the small window at the jungle as it passed by beneath them in a blur of green and random villages on their way to the remote section of coast where the resort resided. At some point Francisco must have noticed her excessive staring, "Este es la tierra de los dios, no?'
Jo glanced back at him, seeing him watching her over the rims of his dark aviators and under the bill of his cap. She couldn't help but smile, "Verdad. Es... es increible. No tengo los palabras."
Francisco nodded. "Verdad." He smiled and turned back to the windscreen. everyone remained silent the rest of the flight.
~~~
"Oh my God. Oh my God. Oh my God." It was all Joanna could say upon setting eyes on the bungalow that would be theirs for the next week. The beach under her feet, the sea in front of her, jungle behind her and a bright blue sky above her. She was in paradise. Truly.
"I know right." Kyle dropped the bags by the door and joined her outside. "It's perfect." He came up behind her and wrapped his arms around her waist, kissing the top of her head as she leaned back into him. "This is perfect."
~~~
The first thing Joanna did was put on her bikini and a pair of shorts, grabbed her camera, and headed for the beach. For a change it wasn't model wannabes, actor hopefuls, suburban families or Instagram influencers in front of her lens. She couldn't remember the last time she had taken pictures just for the enjoyment of it. It was the most amazing feeling. Without even thinking about it she spent the whole afternoon wandering the beach and the resort snapping pictures. The ocean, the jungle, the mountains, young couples playing in the surf and lovers cuddled in the shade.
Joanna hadn't realized how late it was until she came back to the bungalow to find Kyle dressed for dinner in pastel shorts and a linen shirt. "Was beginning to wonder if you got lost or something. Got out of the shouer and you were gone."
"Sorry." She shrugged out of her camera strap, "Wanna see what I found?" Jo clicked some buttons on her camera and turned it so Kyle could see the screen.
"I made reservations at the restaurant for us tonight. Why don't you go get ready."
~~~
Dinner had been amazing and when the restaurant served drinks and desert a band had started playing. Couples all around them were attempting their best Tangos or Cumbias but Joanna was worried about Kyle. He had been off ever since Bogota and she worried her wandering off hadn't helped matters.
Just when she was about to ask him he took a sip of his cocktail and cleared his throat. "Joanna." He leaned forward, "Do you know what tonight is?" He took her blank stare as a no, "This is our anniversary. Well unofficially at least, it's the anniversary of the day we first met. Three years ago."
Realization hit her, "Oh, the cab! We fought over a cab and I called you an asshole." She chuckled.
"It's okay, it was worth it. All part of the journey." He stared at her, clear blue eyes glinting in the candles and tiki torches.
Joanna smiled, unsure of what to say. Instead she just stared at his handsome face. Then out of nowhere he was kneeling in front of her, staring at her, his hand reaching into his pocket as the diners around them all collectively began to notice, and look their way.
"Joanna..." He looked as if he was considering his words carefully, hoping to be long and eloquent but found nothing, "Will you marry me?"
Awestruck Jo blinked at him, heart in her throat and forgetting to breath. Now she was the one at a loss for words. So, she wrapped her arms around his neck and kissed him while the rest of the diners applauded and cheered.
---
Chapter Two/Day Two - Read Here!
14 notes · View notes
Text
Higher-Order Components In React
We will learn about higher-order components,the syntax of higher-order components,we will learn all this with real life instances.In this procedure, which is simple, we will construct a higher-order component from a current React component.Ultimately,   you will easily able to handle the concepts of higher-order components . Higher-order functions in JavaScript is the reason behind the concept of Higher-order components (HOCs) in React.In
React
components,an advanced technique is used for reusing logic in React components,which we call as Higher-Order Components. It is a pattern created out of React’s compositional nature.While working with HOCs,we have to keep in mind the DRY(Don’t-repeat-yourself) programming principles which we will repeatedly use if we are a software developer.This is the perfect way for dealing with software development,it is more important when trying to build an application or writing code in normal.In this tutorship,the basic structure,some conditions,what is all about HOCs and ultimately an example.  Note: Basic knowledge of React and JavaScript will come in handy as you work through this tutorial. React Best PracticesReact is an incredible JavaScript library which is basically used in making easy user friendly interfaces.It contributes in a great way,supplying component abstraction which is helpful in making interfaces with ease into a more functioning.
Higher-Order Functions In JavaScriptBefore jumping into HOCs in React,let’s briefly discuss higher-order functions in JavaScript. When we are able to understand them it will be a lot easier for us to understand react concepts.
Higher –order functions in Java Script will take some of the functions as arguments and return another function.They permit us detach not only over just values,but also over actions.They are displayed in different forms and are useful as they help in writing code when we are dealing with  functions and also with arrays.
The most intriguing piece of utilizing higher-request capacities is organization.We can compose little capacities that handle one bit of rationale.At that point, we can make complex capacities by utilizing the distinctive little capacities we have made.This diminishes bugs in our code base and makes our code a lot simpler to peruse and comprehend. JavaScript has a portion of these capacities previously inherent.A few instances of higher-request capacities are the accompanying: 1..forEach()This iterates over every element in an array with the same code,but does not change or mutate the array,and it returns undefined.
2..map() This method transforms an array by applying a function to all of its elements,and then building a new array from the returned values.
3..reduce() This method executes a provided function for each value of the array (from left to right).
4..filter() This checks every single element in an array to see whether it meets certain criteria as specified in the filter method,and then it returns a new array with the elements that match the criteria.
So many higher-order functions are built into JavaScript,and you can make your own custom ones. An  Example  Of  Custom Higher-Order Function Let us assume we are asked to make   a capacity that groups whole numbers as monetary forms,including some of the customizing of indicating the cash image and including a decimal separator for the money sum.We can even compose a higher-other capacity that takes the money image and furthermore the decimal separator.This equivalent capacity would then arrange for the worth went to it with the money image and decimal administrators.We would name our higher-request work formatCurrency.
const formatCurrency = function(  currencySymbol,  decimalSeparator ) {  return function( value ) {  const wholePart = Math.trunc( value / 100 );  let fractionalPart = value % 100;  if ( fractionalPart < 10 ) {  fractionalPart = '0' + fractionalPart;  }  return `${currencySymbol}${wholePart}${decimalSeparator}${fractionalPart}`;  } }
formatCurrency  it restores a capacity with a fixed cash image and a decimal separator. We at that point of time will pass the formatter a worth,and organization this incentive with the capacity by removing its entire part and the partial part.The returned estimation of this capacity is built by a layout exacting, connecting the cash image,the entire part,the decimal separator,and the partial part.  We should utilize this higher-request work by allotting an incentive to it and seeing the outcome.
> getLabel = formatCurrency( '$', '.' ); > getLabel( 1999 ) "$19.99" //formatted value > getLabel( 2499 ) "$24.99" //formatted value
You may have seen that we made a variable named  getLabel,at that point allotted our formatCurrency higher-request capacity,and afterward passed the cash formatters to the capacity,which is the money image and a decimal separator.To utilize the capacity, we call getLabel,which is currently a capacity, and we go in the worth that should be organized. That's it in a nutshell! We have made a custom higher request of our decision.  What Is A Higher-Order Component?A higher-order part (HOC) is basically a very sophisticated component for reusing logic in React elements.Components take one or a lot of elements as arguments,and come back a brand new upgraded part.Sounds acquainted,right? They're almost like higher-order functions, that take some performs as AN argument and manufacture a brand new function. HOCs area unit normally wont to style elements with bound shared behavior in an exceedingly means that creates them connected otherwise than traditional state-to-props pattern. Facts About HOCS1. We don’t modify or mutate components.We create new ones.2. A HOC is used to compose components for code reuse.3. A HOC is a pure function. It has no side effects, returning only a new component. Here are some examples of real-world HOCs you might have come across:
react-redux    connect(mapStateToProps, mapDispatchToProps) (UserPage) react-router    withRouter(UserPage) material-ui     withStyles(styles)(UserPage)
Structure Of A Higher-Order elementA HOC is structured sort of a higher-order function:It is a element.It takes associate degree other element as an argument.Then,it returns a replacement element.The element it returns will render the first element that was passed to that.The snip below shows however a HOC is structured in React:
import React from 'react'; // Take in a component as argument WrappedComponent const higherOrderComponent = (WrappedComponent) => { // And return another component class HOC extends React.Component { render() { return <WrappedComponent />; } } return HOC; };
We can see that higher Order Component takes a element (Wrapped Component) and returns another element within it.With this method, whenever we'd like to utilize a selected component’s logic for one thing,we will produce a HOC out of that element and use it where we tend to like.
Use CasesIn my experience as a front-end engineer who has been writing React for a while now,here are some use cases for HOCs.
Show a loader while a component waits for data
Most of the time,once building an internet application,we'd have to be compelled to use a loader of some kind that's displayed whereas a element is looking forward to knowledge to be passed to its props.we tend to may simply use associate degree in-component answer to render the loader,which might work, however it wouldn’t be the foremost elegant answer. higher would be to put in writing a standard HOC that may track those props;associate degree whereas those props haven’t been injected or area unit in an empty state,it will show a loading state. To explain this properly,let’s build an inventory of classes of public arthropod genus, mistreatment its open API.We tend to tend to handle list-loading,in order that our purchasers don’t panic once the API we tend to have gotten knowledge from takes such a lot time to retort.
Let’s generate a React app:
npx create-react-app repos-list
A basic list component can be written as follows:
//List.js import React from 'react'; const List = (props) => { const { repos } = props; if (!repos) return null; if (!repos.length) return <p>No repos, sorry</p>; return ( <ul> {repos.map((repo) => { return <li key={repo.id}>{repo.full_name}</li>; })} </ul> ); }; export default List;
The code above is a list component. Let’s break down the code into tiny bits so that we can understand what is happening.
const List = (props) => {};
Above, we initialize our functional component, named List, and pass props to it.
const { repos } = props;
Then,we create a constant, named repos,and pass it to our component props,so that it can be used to modify our component.
if (!repos) return null; if (!repos.length) return <p>No repos, sorry</p>;
Above,we have a tendency to square measure primarily voice communication that,if once taking has completed and also the repos prop remains empty,then it ought to come null.we have a tendency to also are concluding a conditional render here:If the length of the repos prop remains empty, then it ought to render “No repos, sorry” in our browser.
return ( <ul> {repos.map((repo) => { return <li key={repo.id}>{repo.full_name}</li>; })} </ul> );
Here,we have a tendency to square measure essentially mapping through the repos array and returning an inventory of repos per their full names,with a novel key for every entry. Now,let’s write a HOC that handles loading, to form our users happy.
//withdLoading.js import React from 'react'; function WithLoading(Component) { return function WihLoadingComponent({ isLoading, ...props }) { if (!isLoading) return <Component {...props} />; return <p>Hold on, fetching data might take some time.</p>; }; } export default WithLoading;
This would show the text “Hold on, winning information may take some time” once the app continues to be winning information and therefore the props are being injected into state. we have a tendency to build use of isLoadingto see whether or not the part ought to be rendered.
Now,in your App.js file,you'll pass the loading logic to WithLoading,without concern concerning it in your List.
import React from 'react'; import List from './components/List.js'; import WithLoading from './components/withLoading.js'; const ListWithLoading = WithLoading(List); class App extends React.Component { state = { { }; componentDidMount() { this.setState({ loading: true }); fetch(`https://api.github.com/users/hacktivist123/repos`) .then((json) => json.json()) .then((repos) => { this.setState({ loading: false, repos: repos }); }); } render() { return ( <ListWithLoading isLoading={this.state.loading} repos={this.state.repos} /> ); } } export default App;
The code above which is shown is our entire app.Let’s further distribute it to see what is happening.
class App extends React.Component { state = { loading: false, repos: null, }; componentDidMount() { this.setState({ loading: true }); fetch(`https://api.github.com/users/hacktivist123/repos`) .then((json) => json.json()) .then((repos) => { this.setState({ loading: false, repos: repos }); }); }
All we have a tendency to do here is making a category element named App(),then initializing state with 2 properties,loading:false and repos:null,The initial state of loading is false,whereas the initial state of repos is additionally null. Then, once our element is mounting, we have a tendency to set the state of the loading property to true,and forthwith build a fetch request to the API address that holds the information we want to populate our List element.Once the request is complete,we have a tendency to set the loading state to false and populate the repos state with the information we've got force from the API request.
const ListWithLoading = WithLoading(List);
Here,we create a new component named ListWithLoading and pass the WithLoading HOC that we created and also the List component in it.
render() { return ( <ListWithLoading isLoading={this.state.loading} repos={this.state.repos} /> ); }
Above,we have a tendency to render the ListWithLoading element,that has been supercharged by the WithLoading HOC that we have a tendency to create and additionally the List element in it.Also, we have a tendency to pass the loading state’s price and therefore the repos state’s price as props to the element. Because the page continues to be attempting to drag information from the API,our HOC can render the subsequent text within the browser.
When loading is done and the props are no longer in an empty state,the repos will be rendered to the screen.
Conditionally Render ComponentsSuppose we've a element that has to be rendered only a user is genuine — it's a protected element.We are able to produce a HOC named WithAuth()to wrap that protected element, and so do a sign up the HOC that may render solely that individual element if the user has been genuine . A basic withAuth()HOC, in line with the instance on top of,will be written as follows:
/ withAuth.js import React from "react"; export function withAuth(Component) { return class AuthenticatedComponent extends React.Component { isAuthenticated() { return this.props.isAuthenticated; } /** * Render */ render() { const loginErrorMessage = ( <div> Please <a href="/login">login</a> in order to view this part of the application. </div> ); return ( <div> { this.isAuthenticated === true ? <Component {...this.props} /> : loginErrorMessage } </div> ); } }; } export default withAuth;
The code higher than could be a HOC named withAuth.It essentially takes a element and returns a replacement element,named AuthenticatedComponent,that checks whether or not the user is genuine.If the user isn't genuine,it returns the loginErrorMessage component;if the user is genuine, it returns the wrapped element.
Note: this.props.isAuthenticated has to be set from your application’s logic.(or else use react-redux to retrieve it from the global state.) To make use of our HOC in a protected component, we’d use it like so:
// MyProtectedComponent.js import React from "react"; import {withAuth} from "./withAuth.js"; export class MyProectedComponent extends React.Component { /** * Render */ render() { return ( <div> This is only viewable by authenticated users. </div> ); } } // Now wrap MyPrivateComponent with the requireAuthentication function export default withAuth(MyPrivateComponent);
Here, we tend to produce a part that's visible solely by users World Health Organization area unit documented. we tend to wrap that part in our withAuthHOC to shield the part from users World Health Organization aren't documented.
Provide Components with Specific StylingBelow are some of the examples by which you can style specifically.
CSS StylesheetInline StylingCSS Modules Styled-
Continuing the components use case higher than,supported no matter UI state you get from the HOC,you'll render specific designs for specific UI states.As an example,if the requirement arises in multiple places for designs like backgroundColor,fontSize so on,they will be provided via a HOC by wrapping the element with one that simply injects props with the particular className.Take an awfully straightforward element that renders “hello” and therefore the name of someone.It takes a reputation prop and a few different prop that may have an effect on the rendered JavaScript XML (JSX).
// A simple component const HelloComponent = ({ name, ...otherProps }) => ( <div {...otherProps}>Hello {name}!/div> );
Let’s create a HOC named withStyling that adds some styling to the “hello” text.
const withStyling = (BaseComponent) => (props) => ( <BaseComponent {...props} style={{ fontWeight: 700, color: 'green' }} /> );
In order to make use of the HOC on our HelloComponent,we wrap the HOC around the component.We create a pure component,named EnhancedHello,and assign the HOC and our HelloComponent,like so:
const EnhancedHello = withStyling(HelloComponent);
To make a change to our HelloComponent,we render the EnhancedHello component:
<EnhancedHello name='World' />
Now, the text in our HelloComponent becomes this:
<div style={{fontWeight: 700, color: 'green' }}>Hello World</div>
Provide A Component With Any Prop You WantThis is a well-liked use case for HOCs.We are able to study our code base and note what reusable prop is required across elements.Then,we are able to have a wrapper HOC to supply those elements with the reusable prop.Let’s use the instance above:
// A simple component const HelloComponent = ({ name, ...otherProps }) => ( <div {...otherProps}>Hello {name}!</div> );
Let’s create a HOC named  withNameChange  that sets a name  prop on a base component to “New Name”.
const withNameChange = (BaseComponent) => (props) => ( <BaseComponent {...props} name='New Name' /> );
In order to use the HOC on our HelloComponent,we wrap the HOC around the component,create a pure component named EnhancedHello2,and assign the HOC and our HelloComponent like so:
const EnhancedHello2 = withNameChange(HelloComponent);
To make a change to our HelloComponent,we can render the EnhancedHello component like so:
<EnhancedHello />
Now, the text in our HelloComponent becomes this:
<div>Hello New World</div>
To change the name prop, all we have to do is this:
<EnhancedHello name='Shedrack' />
The text in our HelloComponent becomes this:
<div>Hello Shedrack</div>
Let’s focus on Building A Higher - Order ComponentIn this section,we'll build a HOC that takes a element that encompasses a name prop,so we'll create use of the name  prop in our HOC.So,generate a brand new
React
app with create-react-app :
npx create-react-app my-app
After it is generated, replace the code in your index.js file with the following snippet.
import React from 'react'; import { render } from 'react-dom'; const Hello = ({ name }) => <h1> Hello {name}! </h1>; function withName(WrappedComponent) { return class extends React.Component { render() { return <WrappedComponent name="Smashing Magazine" {...this.props} />; } }; } const NewComponent = withName(Hello); const App = () => <div> <NewComponent /> </div>; render(<App />, document.getElementById('root'));
Once you have replaced the code in your index.js file,you should see the following on your screen:
Let’s go in detail through the snippet piece by piece.
const Hello = ({ name }) => <h1> Hello {name}! </h1>;
Here,we create a functional component that has a prop called name.In this functional component,we render the “Hello” and the value of the name prop in an h1 tag.
function withName(WrappedComponent) { return class extends React.Component { render() { return <WrappedComponent name="Smashing Magazine" {...this.props} />; } }; }
Above,we tend to produce a higher-order purposeful element named withName().Then, we tend to come associate anonymous category element within that renders the element wrapped within the HOC. and that we assign a price to the prop of the wrapped element.
const NewComponent = withName(Hello);
Here,we have a tendency to produce a replacement element named NewComponent. we have a tendency to use the HOC that we have a tendency to created, and assign thereto the practical element that we have a tendency to created at the beginning of the code base,named hello.
const App = () => <div> <NewComponent /> </div>; render(<App />, document.getElementById('root'));
All we have a tendency to do higher than is making another useful element, named App.It renders the  NewComponent that we have a tendency to upgraded with our HOC in a very div Then,we have a tendency to use the react-dom perform render  to show the element within the browser. That’s all we want to do! Our withName perform takes a element as associate degree argument and returns a HOC. A number of months from currently,if we have a tendency to commit to amendment things around,we have a tendency to solely need to edit our HOC. ConclusionI hope you’ve enjoyed operating through this tutorship.You'll be able to scan a lot of regarding higher-order parts within the references listed below.If you have got any queries,leave them within the comments section below.I’ll be happy to answer all.
0 notes
lakhwanabhishek · 3 years
Text
Higher-Order Components In React
We will learn about higher-order components,the syntax of higher-order components,we will learn all this with real life instances.In this procedure, which is simple, we will construct a higher-order component from a current React component.Ultimately,   you will easily able to handle the concepts of higher-order components . Higher-order functions in JavaScript is the reason behind the concept of Higher-order components (HOCs) in React.In
React
components,an advanced technique is used for reusing logic in React components,which we call as Higher-Order Components. It is a pattern created out of React’s compositional nature.While working with HOCs,we have to keep in mind the DRY(Don’t-repeat-yourself) programming principles which we will repeatedly use if we are a software developer.This is the perfect way for dealing with software development,it is more important when trying to build an application or writing code in normal.In this tutorship,the basic structure,some conditions,what is all about HOCs and ultimately an example.  Note: Basic knowledge of React and JavaScript will come in handy as you work through this tutorial. React Best PracticesReact is an incredible JavaScript library which is basically used in making easy user friendly interfaces.It contributes in a great way,supplying component abstraction which is helpful in making interfaces with ease into a more functioning.
Higher-Order Functions In JavaScriptBefore jumping into HOCs in React,let’s briefly discuss higher-order functions in JavaScript. When we are able to understand them it will be a lot easier for us to understand react concepts.
Higher –order functions in Java Script will take some of the functions as arguments and return another function.They permit us detach not only over just values,but also over actions.They are displayed in different forms and are useful as they help in writing code when we are dealing with  functions and also with arrays.
The most intriguing piece of utilizing higher-request capacities is organization.We can compose little capacities that handle one bit of rationale.At that point, we can make complex capacities by utilizing the distinctive little capacities we have made.This diminishes bugs in our code base and makes our code a lot simpler to peruse and comprehend. JavaScript has a portion of these capacities previously inherent.A few instances of higher-request capacities are the accompanying: 1..forEach()This iterates over every element in an array with the same code,but does not change or mutate the array,and it returns undefined.
2..map() This method transforms an array by applying a function to all of its elements,and then building a new array from the returned values.
3..reduce() This method executes a provided function for each value of the array (from left to right).
4..filter() This checks every single element in an array to see whether it meets certain criteria as specified in the filter method,and then it returns a new array with the elements that match the criteria.
So many higher-order functions are built into JavaScript,and you can make your own custom ones. An  Example  Of  Custom Higher-Order Function Let us assume we are asked to make   a capacity that groups whole numbers as monetary forms,including some of the customizing of indicating the cash image and including a decimal separator for the money sum.We can even compose a higher-other capacity that takes the money image and furthermore the decimal separator.This equivalent capacity would then arrange for the worth went to it with the money image and decimal administrators.We would name our higher-request work formatCurrency.
const formatCurrency = function(  currencySymbol,  decimalSeparator ) {  return function( value ) {  const wholePart = Math.trunc( value / 100 );  let fractionalPart = value % 100;  if ( fractionalPart < 10 ) {  fractionalPart = '0' + fractionalPart;  }  return `${currencySymbol}${wholePart}${decimalSeparator}${fractionalPart}`;  } }
formatCurrency  it restores a capacity with a fixed cash image and a decimal separator. We at that point of time will pass the formatter a worth,and organization this incentive with the capacity by removing its entire part and the partial part.The returned estimation of this capacity is built by a layout exacting, connecting the cash image,the entire part,the decimal separator,and the partial part.  We should utilize this higher-request work by allotting an incentive to it and seeing the outcome.
> getLabel = formatCurrency( '$', '.' ); > getLabel( 1999 ) "$19.99" //formatted value > getLabel( 2499 ) "$24.99" //formatted value
You may have seen that we made a variable named  getLabel,at that point allotted our formatCurrency higher-request capacity,and afterward passed the cash formatters to the capacity,which is the money image and a decimal separator.To utilize the capacity, we call getLabel,which is currently a capacity, and we go in the worth that should be organized. That's it in a nutshell! We have made a custom higher request of our decision.  What Is A Higher-Order Component?A higher-order part (HOC) is basically a very sophisticated component for reusing logic in React elements.Components take one or a lot of elements as arguments,and come back a brand new upgraded part.Sounds acquainted,right? They're almost like higher-order functions, that take some performs as AN argument and manufacture a brand new function. HOCs area unit normally wont to style elements with bound shared behavior in an exceedingly means that creates them connected otherwise than traditional state-to-props pattern. Facts About HOCS1. We don’t modify or mutate components.We create new ones.2. A HOC is used to compose components for code reuse.3. A HOC is a pure function. It has no side effects, returning only a new component. Here are some examples of real-world HOCs you might have come across:
react-redux    connect(mapStateToProps, mapDispatchToProps) (UserPage) react-router    withRouter(UserPage) material-ui     withStyles(styles)(UserPage)
Structure Of A Higher-Order elementA HOC is structured sort of a higher-order function:It is a element.It takes associate degree other element as an argument.Then,it returns a replacement element.The element it returns will render the first element that was passed to that.The snip below shows however a HOC is structured in React:
import React from 'react'; // Take in a component as argument WrappedComponent const higherOrderComponent = (WrappedComponent) => { // And return another component class HOC extends React.Component { render() { return <WrappedComponent />; } } return HOC; };
We can see that higher Order Component takes a element (Wrapped Component) and returns another element within it.With this method, whenever we'd like to utilize a selected component’s logic for one thing,we will produce a HOC out of that element and use it where we tend to like.
Use CasesIn my experience as a front-end engineer who has been writing React for a while now,here are some use cases for HOCs.
Show a loader while a component waits for data
Most of the time,once building an internet application,we'd have to be compelled to use a loader of some kind that's displayed whereas a element is looking forward to knowledge to be passed to its props.we tend to may simply use associate degree in-component answer to render the loader,which might work, however it wouldn’t be the foremost elegant answer. higher would be to put in writing a standard HOC that may track those props;associate degree whereas those props haven’t been injected or area unit in an empty state,it will show a loading state. To explain this properly,let’s build an inventory of classes of public arthropod genus, mistreatment its open API.We tend to tend to handle list-loading,in order that our purchasers don’t panic once the API we tend to have gotten knowledge from takes such a lot time to retort.
Let’s generate a React app:
npx create-react-app repos-list
A basic list component can be written as follows:
//List.js import React from 'react'; const List = (props) => { const { repos } = props; if (!repos) return null; if (!repos.length) return <p>No repos, sorry</p>; return ( <ul> {repos.map((repo) => { return <li key={repo.id}>{repo.full_name}</li>; })} </ul> ); }; export default List;
The code above is a list component. Let’s break down the code into tiny bits so that we can understand what is happening.
const List = (props) => {};
Above, we initialize our functional component, named List, and pass props to it.
const { repos } = props;
Then,we create a constant, named repos,and pass it to our component props,so that it can be used to modify our component.
if (!repos) return null; if (!repos.length) return <p>No repos, sorry</p>;
Above,we have a tendency to square measure primarily voice communication that,if once taking has completed and also the repos prop remains empty,then it ought to come null.we have a tendency to also are concluding a conditional render here:If the length of the repos prop remains empty, then it ought to render “No repos, sorry” in our browser.
return ( <ul> {repos.map((repo) => { return <li key={repo.id}>{repo.full_name}</li>; })} </ul> );
Here,we have a tendency to square measure essentially mapping through the repos array and returning an inventory of repos per their full names,with a novel key for every entry. Now,let’s write a HOC that handles loading, to form our users happy.
//withdLoading.js import React from 'react'; function WithLoading(Component) { return function WihLoadingComponent({ isLoading, ...props }) { if (!isLoading) return <Component {...props} />; return <p>Hold on, fetching data might take some time.</p>; }; } export default WithLoading;
This would show the text “Hold on, winning information may take some time” once the app continues to be winning information and therefore the props are being injected into state. we have a tendency to build use of isLoadingto see whether or not the part ought to be rendered.
Now,in your App.js file,you'll pass the loading logic to WithLoading,without concern concerning it in your List.
import React from 'react'; import List from './components/List.js'; import WithLoading from './components/withLoading.js'; const ListWithLoading = WithLoading(List); class App extends React.Component { state = { { }; componentDidMount() { this.setState({ loading: true }); fetch(`https://api.github.com/users/hacktivist123/repos`) .then((json) => json.json()) .then((repos) => { this.setState({ loading: false, repos: repos }); }); } render() { return ( <ListWithLoading isLoading={this.state.loading} repos={this.state.repos} /> ); } } export default App;
The code above which is shown is our entire app.Let’s further distribute it to see what is happening.
class App extends React.Component { state = { loading: false, repos: null, }; componentDidMount() { this.setState({ loading: true }); fetch(`https://api.github.com/users/hacktivist123/repos`) .then((json) => json.json()) .then((repos) => { this.setState({ loading: false, repos: repos }); }); }
All we have a tendency to do here is making a category element named App(),then initializing state with 2 properties,loading:false and repos:null,The initial state of loading is false,whereas the initial state of repos is additionally null. Then, once our element is mounting, we have a tendency to set the state of the loading property to true,and forthwith build a fetch request to the API address that holds the information we want to populate our List element.Once the request is complete,we have a tendency to set the loading state to false and populate the repos state with the information we've got force from the API request.
const ListWithLoading = WithLoading(List);
Here,we create a new component named ListWithLoading and pass the WithLoading HOC that we created and also the List component in it.
render() { return ( <ListWithLoading isLoading={this.state.loading} repos={this.state.repos} /> ); }
Above,we have a tendency to render the ListWithLoading element,that has been supercharged by the WithLoading HOC that we have a tendency to create and additionally the List element in it.Also, we have a tendency to pass the loading state’s price and therefore the repos state’s price as props to the element. Because the page continues to be attempting to drag information from the API,our HOC can render the subsequent text within the browser.
When loading is done and the props are no longer in an empty state,the repos will be rendered to the screen.
Conditionally Render ComponentsSuppose we've a element that has to be rendered only a user is genuine — it's a protected element.We are able to produce a HOC named WithAuth()to wrap that protected element, and so do a sign up the HOC that may render solely that individual element if the user has been genuine . A basic withAuth()HOC, in line with the instance on top of,will be written as follows:
/ withAuth.js import React from "react"; export function withAuth(Component) { return class AuthenticatedComponent extends React.Component { isAuthenticated() { return this.props.isAuthenticated; } /** * Render */ render() { const loginErrorMessage = ( <div> Please <a href="/login">login</a> in order to view this part of the application. </div> ); return ( <div> { this.isAuthenticated === true ? <Component {...this.props} /> : loginErrorMessage } </div> ); } }; } export default withAuth;
The code higher than could be a HOC named withAuth.It essentially takes a element and returns a replacement element,named AuthenticatedComponent,that checks whether or not the user is genuine.If the user isn't genuine,it returns the loginErrorMessage component;if the user is genuine, it returns the wrapped element.
Note: this.props.isAuthenticated has to be set from your application’s logic.(or else use react-redux to retrieve it from the global state.) To make use of our HOC in a protected component, we’d use it like so:
// MyProtectedComponent.js import React from "react"; import {withAuth} from "./withAuth.js"; export class MyProectedComponent extends React.Component { /** * Render */ render() { return ( <div> This is only viewable by authenticated users. </div> ); } } // Now wrap MyPrivateComponent with the requireAuthentication function export default withAuth(MyPrivateComponent);
Here, we tend to produce a part that's visible solely by users World Health Organization area unit documented. we tend to wrap that part in our withAuthHOC to shield the part from users World Health Organization aren't documented.
Provide Components with Specific StylingBelow are some of the examples by which you can style specifically.
CSS StylesheetInline StylingCSS Modules Styled-
Continuing the components use case higher than,supported no matter UI state you get from the HOC,you'll render specific designs for specific UI states.As an example,if the requirement arises in multiple places for designs like backgroundColor,fontSize so on,they will be provided via a HOC by wrapping the element with one that simply injects props with the particular className.Take an awfully straightforward element that renders “hello” and therefore the name of someone.It takes a reputation prop and a few different prop that may have an effect on the rendered JavaScript XML (JSX).
// A simple component const HelloComponent = ({ name, ...otherProps }) => ( <div {...otherProps}>Hello {name}!/div> );
Let’s create a HOC named withStyling that adds some styling to the “hello” text.
const withStyling = (BaseComponent) => (props) => ( <BaseComponent {...props} style={{ fontWeight: 700, color: 'green' }} /> );
In order to make use of the HOC on our HelloComponent,we wrap the HOC around the component.We create a pure component,named EnhancedHello,and assign the HOC and our HelloComponent,like so:
const EnhancedHello = withStyling(HelloComponent);
To make a change to our HelloComponent,we render the EnhancedHello component:
<EnhancedHello name='World' />
Now, the text in our HelloComponent becomes this:
<div style={{fontWeight: 700, color: 'green' }}>Hello World</div>
Provide A Component With Any Prop You WantThis is a well-liked use case for HOCs.We are able to study our code base and note what reusable prop is required across elements.Then,we are able to have a wrapper HOC to supply those elements with the reusable prop.Let’s use the instance above:
// A simple component const HelloComponent = ({ name, ...otherProps }) => ( <div {...otherProps}>Hello {name}!</div> );
Let’s create a HOC named  withNameChange  that sets a name  prop on a base component to “New Name”.
const withNameChange = (BaseComponent) => (props) => ( <BaseComponent {...props} name='New Name' /> );
In order to use the HOC on our HelloComponent,we wrap the HOC around the component,create a pure component named EnhancedHello2,and assign the HOC and our HelloComponent like so:
const EnhancedHello2 = withNameChange(HelloComponent);
To make a change to our HelloComponent,we can render the EnhancedHello component like so:
<EnhancedHello />
Now, the text in our HelloComponent becomes this:
<div>Hello New World</div>
To change the name prop, all we have to do is this:
<EnhancedHello name='Shedrack' />
The text in our HelloComponent becomes this:
<div>Hello Shedrack</div>
Let’s focus on Building A Higher - Order ComponentIn this section,we'll build a HOC that takes a element that encompasses a name prop,so we'll create use of the name  prop in our HOC.So,generate a brand new
React
app with create-react-app :
npx create-react-app my-app
After it is generated, replace the code in your index.js file with the following snippet.
import React from 'react'; import { render } from 'react-dom'; const Hello = ({ name }) => <h1> Hello {name}! </h1>; function withName(WrappedComponent) { return class extends React.Component { render() { return <WrappedComponent name="Smashing Magazine" {...this.props} />; } }; } const NewComponent = withName(Hello); const App = () => <div> <NewComponent /> </div>; render(<App />, document.getElementById('root'));
Once you have replaced the code in your index.js file,you should see the following on your screen:
Let’s go in detail through the snippet piece by piece.
const Hello = ({ name }) => <h1> Hello {name}! </h1>;
Here,we create a functional component that has a prop called name.In this functional component,we render the “Hello” and the value of the name prop in an h1 tag.
function withName(WrappedComponent) { return class extends React.Component { render() { return <WrappedComponent name="Smashing Magazine" {...this.props} />; } }; }
Above,we tend to produce a higher-order purposeful element named withName().Then, we tend to come associate anonymous category element within that renders the element wrapped within the HOC. and that we assign a price to the prop of the wrapped element.
const NewComponent = withName(Hello);
Here,we have a tendency to produce a replacement element named NewComponent. we have a tendency to use the HOC that we have a tendency to created, and assign thereto the practical element that we have a tendency to created at the beginning of the code base,named hello.
const App = () => <div> <NewComponent /> </div>; render(<App />, document.getElementById('root'));
All we have a tendency to do higher than is making another useful element, named App.It renders the  NewComponent that we have a tendency to upgraded with our HOC in a very div Then,we have a tendency to use the react-dom perform render  to show the element within the browser. That’s all we want to do! Our withName perform takes a element as associate degree argument and returns a HOC. A number of months from currently,if we have a tendency to commit to amendment things around,we have a tendency to solely need to edit our HOC. ConclusionI hope you’ve enjoyed operating through this tutorship.You'll be able to scan a lot of regarding higher-order parts within the references listed below.If you have got any
Source:
whizzystack.co
#b2bservices
#b2b ecommerce
#b2bsales
#b2b seo
0 notes
rvarchivo · 3 years
Text
#Debian: bits from the Release Team: bullseye status update
https://lists.debian.org/debian-devel-announce/2021/05/msg00000.html
> Dear all, > > bullseye is going to rock. We're getting there. This bits is a small > update to explain where we stand and how you can help the bullseye release. > > > debian-installer > ================ > > As it currently stands, what we need to focus on is getting the > debian-installer in the right quality. The debian-installer can use you > help by providing solutions for issues marked as blockers for bug 987441 > [987441] and by trying out the debian-installer [1]. One of the most > worrying issues is a black screen after installation caused by missing > firmware, Lucas wrote a tentative summary of the issue [2] (with some > follow-up). > > RC bugs status > ============== > > At the time of writing 132 unfixed release-critical bugs affect > bullseye, of which 69 are in key packages. This is the number which > needs to reach zero before the release can take place. > > As a reminder, the following changes are eligible for unblocking: > * targeted fixes for release critical bugs (i.e., bugs of severity > critical, grave, and serious); > * fixes for severity: important bugs, only when this can be done via > unstable; > * translation updates and documentation fixes, only when this can be > done via unstable; > * updates to packages directly related to the release process (i.e. > with references to the current layout of the archive), only when this > can be done via unstable; > > Please note that a new upstream release with other changes included does > not count as a "targeted fix". You must cherry-pick patches to fix > bugs unless otherwise directed. Please see our FAQ [3] for questions you > should ask yourself and be able to answer to judge if your new upstream > release has a chance in the unblock process. > > As the release draws nearer, fixes for non-RC bugs which do not affect a > package's general usability will increasingly be deferred or rejected. > > Upgrade testing > =============== > > If you are in a position to carry out upgrade testing from buster to > bullseye in the field, now is the time to do so and send your feedback > as a bug report against the "upgrade-reports" pseudo-package. > > Release notes > ============= > > Please ensure that any information about your packages which should form > part of the release notes is prepared in plenty of time to allow for > review and translations. Release notes coordination happens in the BTS > in bugs filed against the "release-notes" pseudo-package and in merge > requests on salsa [4]. > > Responding to unblock requests > ============================== > > We try hard to keep track of all unblock requests, but there are many > opened every day and the queue can sometimes mean you don't get a > response quickly. You can help as follows: > > * we will not usually look at requests tagged "moreinfo". If you follow > up to a request for information, please remove the tag so that we > review it again. > > * include as much information, rationale and commentary as you can in > your original request. We're probably looking at your package for the > first time and among lots of other requests, so the information you > provide is crucial for proper triaging. > > * don't start discussion about an unblock on the debian-release list or > #debian-release, even if you're not sure whether your fix will be > accepted. Always open a bug and then it can be tracked properly. > > * inclusion of an inline diffstat with commentary plus usage of > filterdiff to exclude generated files (e.g. autofoo) or translations > can be beneficial. When using filterdiff, please remember to include > the filter criteria/the command line, so we know what was omitted. > > Finally, please continue to help the debian-installer and further > concentrate on RC bug fixes and let's get that number down to zero and > release! > > On behalf of the Release Team, > Paul > > [987441] https://bugs.debian.org/987441 > [1] https://www.debian.org/devel/debian-installer/ > [2] https://lists.debian.org/debian-release/2021/04/msg00646.html > [3] https://release.debian.org/bullseye/FAQ.html > [4] https://salsa.debian.org/ddp-team/release-notes/
#gnu #linux #distros #release #community #freesoftware #freesw #gpl #copyleft #free-software #devel
original post
0 notes
Text
Higher-Order Components In React
We will learn about higher-order components,the syntax of higher-order components,we will learn all this with real life instances.In this procedure, which is simple, we will construct a higher-order component from a current React component.Ultimately,   you will easily able to handle the concepts of higher-order components . Higher-order functions in JavaScript is the reason behind the concept of Higher-order components (HOCs) in React.In
React
components,an advanced technique is used for reusing logic in React components,which we call as Higher-Order Components. It is a pattern created out of React’s compositional nature.While working with HOCs,we have to keep in mind the DRY(Don’t-repeat-yourself) programming principles which we will repeatedly use if we are a software developer.This is the perfect way for dealing with software development,it is more important when trying to build an application or writing code in normal.In this tutorship,the basic structure,some conditions,what is all about HOCs and ultimately an example.  Note: Basic knowledge of React and JavaScript will come in handy as you work through this tutorial. React Best PracticesReact is an incredible JavaScript library which is basically used in making easy user friendly interfaces.It contributes in a great way,supplying component abstraction which is helpful in making interfaces with ease into a more functioning.
Higher-Order Functions In JavaScriptBefore jumping into HOCs in React,let’s briefly discuss higher-order functions in JavaScript. When we are able to understand them it will be a lot easier for us to understand react concepts.
Higher –order functions in Java Script will take some of the functions as arguments and return another function.They permit us detach not only over just values,but also over actions.They are displayed in different forms and are useful as they help in writing code when we are dealing with  functions and also with arrays.
The most intriguing piece of utilizing higher-request capacities is organization.We can compose little capacities that handle one bit of rationale.At that point, we can make complex capacities by utilizing the distinctive little capacities we have made.This diminishes bugs in our code base and makes our code a lot simpler to peruse and comprehend. JavaScript has a portion of these capacities previously inherent.A few instances of higher-request capacities are the accompanying: 1..forEach()This iterates over every element in an array with the same code,but does not change or mutate the array,and it returns undefined.
2..map() This method transforms an array by applying a function to all of its elements,and then building a new array from the returned values.
3..reduce() This method executes a provided function for each value of the array (from left to right).
4..filter() This checks every single element in an array to see whether it meets certain criteria as specified in the filter method,and then it returns a new array with the elements that match the criteria.
So many higher-order functions are built into JavaScript,and you can make your own custom ones. An  Example  Of  Custom Higher-Order Function Let us assume we are asked to make   a capacity that groups whole numbers as monetary forms,including some of the customizing of indicating the cash image and including a decimal separator for the money sum.We can even compose a higher-other capacity that takes the money image and furthermore the decimal separator.This equivalent capacity would then arrange for the worth went to it with the money image and decimal administrators.We would name our higher-request work formatCurrency.
const formatCurrency = function(  currencySymbol,  decimalSeparator ) {  return function( value ) {  const wholePart = Math.trunc( value / 100 );  let fractionalPart = value % 100;  if ( fractionalPart < 10 ) {  fractionalPart = '0' + fractionalPart;  }  return `${currencySymbol}${wholePart}${decimalSeparator}${fractionalPart}`;  } }
formatCurrency  it restores a capacity with a fixed cash image and a decimal separator. We at that point of time will pass the formatter a worth,and organization this incentive with the capacity by removing its entire part and the partial part.The returned estimation of this capacity is built by a layout exacting, connecting the cash image,the entire part,the decimal separator,and the partial part.  We should utilize this higher-request work by allotting an incentive to it and seeing the outcome.
> getLabel = formatCurrency( '$', '.' ); > getLabel( 1999 ) "$19.99" //formatted value > getLabel( 2499 ) "$24.99" //formatted value
You may have seen that we made a variable named  getLabel,at that point allotted our formatCurrency higher-request capacity,and afterward passed the cash formatters to the capacity,which is the money image and a decimal separator.To utilize the capacity, we call getLabel,which is currently a capacity, and we go in the worth that should be organized. That's it in a nutshell! We have made a custom higher request of our decision.  What Is A Higher-Order Component?A higher-order part (HOC) is basically a very sophisticated component for reusing logic in React elements.Components take one or a lot of elements as arguments,and come back a brand new upgraded part.Sounds acquainted,right? They're almost like higher-order functions, that take some performs as AN argument and manufacture a brand new function. HOCs area unit normally wont to style elements with bound shared behavior in an exceedingly means that creates them connected otherwise than traditional state-to-props pattern. Facts About HOCS1. We don’t modify or mutate components.We create new ones.2. A HOC is used to compose components for code reuse.3. A HOC is a pure function. It has no side effects, returning only a new component. Here are some examples of real-world HOCs you might have come across:
react-redux    connect(mapStateToProps, mapDispatchToProps) (UserPage) react-router    withRouter(UserPage) material-ui     withStyles(styles)(UserPage)
Structure Of A Higher-Order elementA HOC is structured sort of a higher-order function:It is a element.It takes associate degree other element as an argument.Then,it returns a replacement element.The element it returns will render the first element that was passed to that.The snip below shows however a HOC is structured in React:
import React from 'react'; // Take in a component as argument WrappedComponent const higherOrderComponent = (WrappedComponent) => { // And return another component class HOC extends React.Component { render() { return <WrappedComponent />; } } return HOC; };
We can see that higher Order Component takes a element (Wrapped Component) and returns another element within it.With this method, whenever we'd like to utilize a selected component’s logic for one thing,we will produce a HOC out of that element and use it where we tend to like.
Use CasesIn my experience as a front-end engineer who has been writing React for a while now,here are some use cases for HOCs.
Show a loader while a component waits for data
Most of the time,once building an internet application,we'd have to be compelled to use a loader of some kind that's displayed whereas a element is looking forward to knowledge to be passed to its props.we tend to may simply use associate degree in-component answer to render the loader,which might work, however it wouldn’t be the foremost elegant answer. higher would be to put in writing a standard HOC that may track those props;associate degree whereas those props haven’t been injected or area unit in an empty state,it will show a loading state. To explain this properly,let’s build an inventory of classes of public arthropod genus, mistreatment its open API.We tend to tend to handle list-loading,in order that our purchasers don’t panic once the API we tend to have gotten knowledge from takes such a lot time to retort.
Let’s generate a React app:
npx create-react-app repos-list
A basic list component can be written as follows:
//List.js import React from 'react'; const List = (props) => { const { repos } = props; if (!repos) return null; if (!repos.length) return <p>No repos, sorry</p>; return ( <ul> {repos.map((repo) => { return <li key={repo.id}>{repo.full_name}</li>; })} </ul> ); }; export default List;
The code above is a list component. Let’s break down the code into tiny bits so that we can understand what is happening.
const List = (props) => {};
Above, we initialize our functional component, named List, and pass props to it.
const { repos } = props;
Then,we create a constant, named repos,and pass it to our component props,so that it can be used to modify our component.
if (!repos) return null; if (!repos.length) return <p>No repos, sorry</p>;
Above,we have a tendency to square measure primarily voice communication that,if once taking has completed and also the repos prop remains empty,then it ought to come null.we have a tendency to also are concluding a conditional render here:If the length of the repos prop remains empty, then it ought to render “No repos, sorry” in our browser.
return ( <ul> {repos.map((repo) => { return <li key={repo.id}>{repo.full_name}</li>; })} </ul> );
Here,we have a tendency to square measure essentially mapping through the repos array and returning an inventory of repos per their full names,with a novel key for every entry. Now,let’s write a HOC that handles loading, to form our users happy.
//withdLoading.js import React from 'react'; function WithLoading(Component) { return function WihLoadingComponent({ isLoading, ...props }) { if (!isLoading) return <Component {...props} />; return <p>Hold on, fetching data might take some time.</p>; }; } export default WithLoading;
This would show the text “Hold on, winning information may take some time” once the app continues to be winning information and therefore the props are being injected into state. we have a tendency to build use of isLoadingto see whether or not the part ought to be rendered.
Now,in your App.js file,you'll pass the loading logic to WithLoading,without concern concerning it in your List.
import React from 'react'; import List from './components/List.js'; import WithLoading from './components/withLoading.js'; const ListWithLoading = WithLoading(List); class App extends React.Component { state = { { }; componentDidMount() { this.setState({ loading: true }); fetch(`https://api.github.com/users/hacktivist123/repos`) .then((json) => json.json()) .then((repos) => { this.setState({ loading: false, repos: repos }); }); } render() { return ( <ListWithLoading isLoading={this.state.loading} repos={this.state.repos} /> ); } } export default App;
The code above which is shown is our entire app.Let’s further distribute it to see what is happening.
class App extends React.Component { state = { loading: false, repos: null, }; componentDidMount() { this.setState({ loading: true }); fetch(`https://api.github.com/users/hacktivist123/repos`) .then((json) => json.json()) .then((repos) => { this.setState({ loading: false, repos: repos }); }); }
All we have a tendency to do here is making a category element named App(),then initializing state with 2 properties,loading:false and repos:null,The initial state of loading is false,whereas the initial state of repos is additionally null. Then, once our element is mounting, we have a tendency to set the state of the loading property to true,and forthwith build a fetch request to the API address that holds the information we want to populate our List element.Once the request is complete,we have a tendency to set the loading state to false and populate the repos state with the information we've got force from the API request.
const ListWithLoading = WithLoading(List);
Here,we create a new component named ListWithLoading and pass the WithLoading HOC that we created and also the List component in it.
render() { return ( <ListWithLoading isLoading={this.state.loading} repos={this.state.repos} /> ); }
Above,we have a tendency to render the ListWithLoading element,that has been supercharged by the WithLoading HOC that we have a tendency to create and additionally the List element in it.Also, we have a tendency to pass the loading state’s price and therefore the repos state’s price as props to the element. Because the page continues to be attempting to drag information from the API,our HOC can render the subsequent text within the browser.
When loading is done and the props are no longer in an empty state,the repos will be rendered to the screen.
Conditionally Render ComponentsSuppose we've a element that has to be rendered only a user is genuine — it's a protected element.We are able to produce a HOC named WithAuth()to wrap that protected element, and so do a sign up the HOC that may render solely that individual element if the user has been genuine . A basic withAuth()HOC, in line with the instance on top of,will be written as follows:
/ withAuth.js import React from "react"; export function withAuth(Component) { return class AuthenticatedComponent extends React.Component { isAuthenticated() { return this.props.isAuthenticated; } /** * Render */ render() { const loginErrorMessage = ( <div> Please <a href="/login">login</a> in order to view this part of the application. </div> ); return ( <div> { this.isAuthenticated === true ? <Component {...this.props} /> : loginErrorMessage } </div> ); } }; } export default withAuth;
The code higher than could be a HOC named withAuth.It essentially takes a element and returns a replacement element,named AuthenticatedComponent,that checks whether or not the user is genuine.If the user isn't genuine,it returns the loginErrorMessage component;if the user is genuine, it returns the wrapped element.
Note: this.props.isAuthenticated has to be set from your application’s logic.(or else use react-redux to retrieve it from the global state.) To make use of our HOC in a protected component, we’d use it like so:
// MyProtectedComponent.js import React from "react"; import {withAuth} from "./withAuth.js"; export class MyProectedComponent extends React.Component { /** * Render */ render() { return ( <div> This is only viewable by authenticated users. </div> ); } } // Now wrap MyPrivateComponent with the requireAuthentication function export default withAuth(MyPrivateComponent);
Here, we tend to produce a part that's visible solely by users World Health Organization area unit documented. we tend to wrap that part in our withAuthHOC to shield the part from users World Health Organization aren't documented.
Provide Components with Specific StylingBelow are some of the examples by which you can style specifically.
CSS StylesheetInline StylingCSS Modules Styled-
Continuing the components use case higher than,supported no matter UI state you get from the HOC,you'll render specific designs for specific UI states.As an example,if the requirement arises in multiple places for designs like backgroundColor,fontSize so on,they will be provided via a HOC by wrapping the element with one that simply injects props with the particular className.Take an awfully straightforward element that renders “hello” and therefore the name of someone.It takes a reputation prop and a few different prop that may have an effect on the rendered JavaScript XML (JSX).
// A simple component const HelloComponent = ({ name, ...otherProps }) => ( <div {...otherProps}>Hello {name}!/div> );
Let’s create a HOC named withStyling that adds some styling to the “hello” text.
const withStyling = (BaseComponent) => (props) => ( <BaseComponent {...props} style={{ fontWeight: 700, color: 'green' }} /> );
In order to make use of the HOC on our HelloComponent,we wrap the HOC around the component.We create a pure component,named EnhancedHello,and assign the HOC and our HelloComponent,like so:
const EnhancedHello = withStyling(HelloComponent);
To make a change to our HelloComponent,we render the EnhancedHello component:
<EnhancedHello name='World' />
Now, the text in our HelloComponent becomes this:
<div style={{fontWeight: 700, color: 'green' }}>Hello World</div>
Provide A Component With Any Prop You WantThis is a well-liked use case for HOCs.We are able to study our code base and note what reusable prop is required across elements.Then,we are able to have a wrapper HOC to supply those elements with the reusable prop.Let’s use the instance above:
// A simple component const HelloComponent = ({ name, ...otherProps }) => ( <div {...otherProps}>Hello {name}!</div> );
Let’s create a HOC named  withNameChange  that sets a name  prop on a base component to “New Name”.
const withNameChange = (BaseComponent) => (props) => ( <BaseComponent {...props} name='New Name' /> );
In order to use the HOC on our HelloComponent,we wrap the HOC around the component,create a pure component named EnhancedHello2,and assign the HOC and our HelloComponent like so:
const EnhancedHello2 = withNameChange(HelloComponent);
To make a change to our HelloComponent,we can render the EnhancedHello component like so:
<EnhancedHello />
Now, the text in our HelloComponent becomes this:
<div>Hello New World</div>
To change the name prop, all we have to do is this:
<EnhancedHello name='Shedrack' />
The text in our HelloComponent becomes this:
<div>Hello Shedrack</div>
Let’s focus on Building A Higher - Order ComponentIn this section,we'll build a HOC that takes a element that encompasses a name prop,so we'll create use of the name  prop in our HOC.So,generate a brand new
React
app with create-react-app :
npx create-react-app my-app
After it is generated, replace the code in your index.js file with the following snippet.
import React from 'react'; import { render } from 'react-dom'; const Hello = ({ name }) => <h1> Hello {name}! </h1>; function withName(WrappedComponent) { return class extends React.Component { render() { return <WrappedComponent name="Smashing Magazine" {...this.props} />; } }; } const NewComponent = withName(Hello); const App = () => <div> <NewComponent /> </div>; render(<App />, document.getElementById('root'));
Once you have replaced the code in your index.js file,you should see the following on your screen:
Let’s go in detail through the snippet piece by piece.
const Hello = ({ name }) => <h1> Hello {name}! </h1>;
Here,we create a functional component that has a prop called name.In this functional component,we render the “Hello” and the value of the name prop in an h1 tag.
function withName(WrappedComponent) { return class extends React.Component { render() { return <WrappedComponent name="Smashing Magazine" {...this.props} />; } }; }
Above,we tend to produce a higher-order purposeful element named withName().Then, we tend to come associate anonymous category element within that renders the element wrapped within the HOC. and that we assign a price to the prop of the wrapped element.
const NewComponent = withName(Hello);
Here,we have a tendency to produce a replacement element named NewComponent. we have a tendency to use the HOC that we have a tendency to created, and assign thereto the practical element that we have a tendency to created at the beginning of the code base,named hello.
const App = () => <div> <NewComponent /> </div>; render(<App />, document.getElementById('root'));
All we have a tendency to do higher than is making another useful element, named App.It renders the  New Component that we have a tendency to upgraded with our HOC in a very div Then, we have a tendency to use the react-dom perform render  to show the element within the browser. That’s all we want to do! Our with Name perform takes a element as associate degree argument and returns a HOC. A number of months from currently, if we have a tendency to commit to amendment things around, we have a tendency to solely need to edit our HOC. Conclusion I hope you’ve enjoyed operating through this tutorship. You'll be able to scan a lot of regarding higher-order parts within the references listed below. If you have got any queries, leave them within the comments section below. I’ll be happy to answer all.
0 notes
purwanshiagrawal · 3 years
Text
Higher-Order Components In React
We will learn about higher-order components,the syntax of higher-order components,we will learn all this with real life instances.In this procedure, which is simple, we will construct a higher-order component from a current React component.Ultimately,   you will easily able to handle the concepts of higher-order components . Higher-order functions in JavaScript is the reason behind the concept of Higher-order components (HOCs) in React.In
React
components,an advanced technique is used for reusing logic in React components,which we call as Higher-Order Components. It is a pattern created out of React’s compositional nature.While working with HOCs,we have to keep in mind the DRY(Don’t-repeat-yourself) programming principles which we will repeatedly use if we are a software developer.This is the perfect way for dealing with software development,it is more important when trying to build an application or writing code in normal.In this tutorship,the basic structure,some conditions,what is all about HOCs and ultimately an example.  Note: Basic knowledge of React and JavaScript will come in handy as you work through this tutorial. React Best PracticesReact is an incredible JavaScript library which is basically used in making easy user friendly interfaces.It contributes in a great way,supplying component abstraction which is helpful in making interfaces with ease into a more functioning.
Higher-Order Functions In JavaScriptBefore jumping into HOCs in React,let’s briefly discuss higher-order functions in JavaScript. When we are able to understand them it will be a lot easier for us to understand react concepts.
Higher –order functions in Java Script will take some of the functions as arguments and return another function.They permit us detach not only over just values,but also over actions.They are displayed in different forms and are useful as they help in writing code when we are dealing with  functions and also with arrays.
The most intriguing piece of utilizing higher-request capacities is organization.We can compose little capacities that handle one bit of rationale.At that point, we can make complex capacities by utilizing the distinctive little capacities we have made.This diminishes bugs in our code base and makes our code a lot simpler to peruse and comprehend. JavaScript has a portion of these capacities previously inherent.A few instances of higher-request capacities are the accompanying: 1..forEach()This iterates over every element in an array with the same code,but does not change or mutate the array,and it returns undefined.
2..map() This method transforms an array by applying a function to all of its elements,and then building a new array from the returned values.
3..reduce() This method executes a provided function for each value of the array (from left to right).
4..filter() This checks every single element in an array to see whether it meets certain criteria as specified in the filter method,and then it returns a new array with the elements that match the criteria.
So many higher-order functions are built into JavaScript,and you can make your own custom ones. An  Example  Of  Custom Higher-Order Function Let us assume we are asked to make   a capacity that groups whole numbers as monetary forms,including some of the customizing of indicating the cash image and including a decimal separator for the money sum.We can even compose a higher-other capacity that takes the money image and furthermore the decimal separator.This equivalent capacity would then arrange for the worth went to it with the money image and decimal administrators.We would name our higher-request work formatCurrency.
const formatCurrency = function(  currencySymbol,  decimalSeparator ) {  return function( value ) {  const wholePart = Math.trunc( value / 100 );  let fractionalPart = value % 100;  if ( fractionalPart < 10 ) {  fractionalPart = '0' + fractionalPart;  }  return `${currencySymbol}${wholePart}${decimalSeparator}${fractionalPart}`;  } }
formatCurrency  it restores a capacity with a fixed cash image and a decimal separator. We at that point of time will pass the formatter a worth,and organization this incentive with the capacity by removing its entire part and the partial part.The returned estimation of this capacity is built by a layout exacting, connecting the cash image,the entire part,the decimal separator,and the partial part.  We should utilize this higher-request work by allotting an incentive to it and seeing the outcome.
> getLabel = formatCurrency( '$', '.' ); > getLabel( 1999 ) "$19.99" //formatted value > getLabel( 2499 ) "$24.99" //formatted value
You may have seen that we made a variable named  getLabel,at that point allotted our formatCurrency higher-request capacity,and afterward passed the cash formatters to the capacity,which is the money image and a decimal separator.To utilize the capacity, we call getLabel,which is currently a capacity, and we go in the worth that should be organized. That's it in a nutshell! We have made a custom higher request of our decision.  What Is A Higher-Order Component?A higher-order part (HOC) is basically a very sophisticated component for reusing logic in React elements.Components take one or a lot of elements as arguments,and come back a brand new upgraded part.Sounds acquainted,right? They're almost like higher-order functions, that take some performs as AN argument and manufacture a brand new function. HOCs area unit normally wont to style elements with bound shared behavior in an exceedingly means that creates them connected otherwise than traditional state-to-props pattern. Facts About HOCS1. We don’t modify or mutate components.We create new ones.2. A HOC is used to compose components for code reuse.3. A HOC is a pure function. It has no side effects, returning only a new component. Here are some examples of real-world HOCs you might have come across:
react-redux    connect(mapStateToProps, mapDispatchToProps) (UserPage) react-router    withRouter(UserPage) material-ui     withStyles(styles)(UserPage)
Structure Of A Higher-Order elementA HOC is structured sort of a higher-order function:It is a element.It takes associate degree other element as an argument.Then,it returns a replacement element.The element it returns will render the first element that was passed to that.The snip below shows however a HOC is structured in React:
import React from 'react'; // Take in a component as argument WrappedComponent const higherOrderComponent = (WrappedComponent) => { // And return another component class HOC extends React.Component { render() { return <WrappedComponent />; } } return HOC; };
We can see that higher Order Component takes a element (Wrapped Component) and returns another element within it.With this method, whenever we'd like to utilize a selected component’s logic for one thing,we will produce a HOC out of that element and use it where we tend to like.
Use CasesIn my experience as a front-end engineer who has been writing React for a while now,here are some use cases for HOCs.
Show a loader while a component waits for data
Most of the time,once building an internet application,we'd have to be compelled to use a loader of some kind that's displayed whereas a element is looking forward to knowledge to be passed to its props.we tend to may simply use associate degree in-component answer to render the loader,which might work, however it wouldn’t be the foremost elegant answer. higher would be to put in writing a standard HOC that may track those props;associate degree whereas those props haven’t been injected or area unit in an empty state,it will show a loading state. To explain this properly,let’s build an inventory of classes of public arthropod genus, mistreatment its open API.We tend to tend to handle list-loading,in order that our purchasers don’t panic once the API we tend to have gotten knowledge from takes such a lot time to retort.
Let’s generate a React app:
npx create-react-app repos-list
A basic list component can be written as follows:
//List.js import React from 'react'; const List = (props) => { const { repos } = props; if (!repos) return null; if (!repos.length) return <p>No repos, sorry</p>; return ( <ul> {repos.map((repo) => { return <li key={repo.id}>{repo.full_name}</li>; })} </ul> ); }; export default List;
The code above is a list component. Let’s break down the code into tiny bits so that we can understand what is happening.
const List = (props) => {};
Above, we initialize our functional component, named List, and pass props to it.
const { repos } = props;
Then,we create a constant, named repos,and pass it to our component props,so that it can be used to modify our component.
if (!repos) return null; if (!repos.length) return <p>No repos, sorry</p>;
Above,we have a tendency to square measure primarily voice communication that,if once taking has completed and also the repos prop remains empty,then it ought to come null.we have a tendency to also are concluding a conditional render here:If the length of the repos prop remains empty, then it ought to render “No repos, sorry” in our browser.
return ( <ul> {repos.map((repo) => { return <li key={repo.id}>{repo.full_name}</li>; })} </ul> );
Here,we have a tendency to square measure essentially mapping through the repos array and returning an inventory of repos per their full names,with a novel key for every entry. Now,let’s write a HOC that handles loading, to form our users happy.
//withdLoading.js import React from 'react'; function WithLoading(Component) { return function WihLoadingComponent({ isLoading, ...props }) { if (!isLoading) return <Component {...props} />; return <p>Hold on, fetching data might take some time.</p>; }; } export default WithLoading;
This would show the text “Hold on, winning information may take some time” once the app continues to be winning information and therefore the props are being injected into state. we have a tendency to build use of isLoadingto see whether or not the part ought to be rendered.
Now,in your App.js file,you'll pass the loading logic to WithLoading,without concern concerning it in your List.
import React from 'react'; import List from './components/List.js'; import WithLoading from './components/withLoading.js'; const ListWithLoading = WithLoading(List); class App extends React.Component { state = { { }; componentDidMount() { this.setState({ loading: true }); fetch(`https://api.github.com/users/hacktivist123/repos`) .then((json) => json.json()) .then((repos) => { this.setState({ loading: false, repos: repos }); }); } render() { return ( <ListWithLoading isLoading={this.state.loading} repos={this.state.repos} /> ); } } export default App;
The code above which is shown is our entire app.Let’s further distribute it to see what is happening.
class App extends React.Component { state = { loading: false, repos: null, }; componentDidMount() { this.setState({ loading: true }); fetch(`https://api.github.com/users/hacktivist123/repos`) .then((json) => json.json()) .then((repos) => { this.setState({ loading: false, repos: repos }); }); }
All we have a tendency to do here is making a category element named App(),then initializing state with 2 properties,loading:false and repos:null,The initial state of loading is false,whereas the initial state of repos is additionally null. Then, once our element is mounting, we have a tendency to set the state of the loading property to true,and forthwith build a fetch request to the API address that holds the information we want to populate our List element.Once the request is complete,we have a tendency to set the loading state to false and populate the repos state with the information we've got force from the API request.
const ListWithLoading = WithLoading(List);
Here,we create a new component named ListWithLoading and pass the WithLoading HOC that we created and also the List component in it.
render() { return ( <ListWithLoading isLoading={this.state.loading} repos={this.state.repos} /> ); }
Above,we have a tendency to render the ListWithLoading element,that has been supercharged by the WithLoading HOC that we have a tendency to create and additionally the List element in it.Also, we have a tendency to pass the loading state’s price and therefore the repos state’s price as props to the element. Because the page continues to be attempting to drag information from the API,our HOC can render the subsequent text within the browser.
When loading is done and the props are no longer in an empty state,the repos will be rendered to the screen.
Conditionally Render ComponentsSuppose we've a element that has to be rendered only a user is genuine — it's a protected element.We are able to produce a HOC named WithAuth()to wrap that protected element, and so do a sign up the HOC that may render solely that individual element if the user has been genuine . A basic withAuth()HOC, in line with the instance on top of,will be written as follows:
/ withAuth.js import React from "react"; export function withAuth(Component) { return class AuthenticatedComponent extends React.Component { isAuthenticated() { return this.props.isAuthenticated; } /** * Render */ render() { const loginErrorMessage = ( <div> Please <a href="/login">login</a> in order to view this part of the application. </div> ); return ( <div> { this.isAuthenticated === true ? <Component {...this.props} /> : loginErrorMessage } </div> ); } }; } export default withAuth;
The code higher than could be a HOC named withAuth.It essentially takes a element and returns a replacement element,named AuthenticatedComponent,that checks whether or not the user is genuine.If the user isn't genuine,it returns the loginErrorMessage component;if the user is genuine, it returns the wrapped element.
Note: this.props.isAuthenticated has to be set from your application’s logic.(or else use react-redux to retrieve it from the global state.) To make use of our HOC in a protected component, we’d use it like so:
// MyProtectedComponent.js import React from "react"; import {withAuth} from "./withAuth.js"; export class MyProectedComponent extends React.Component { /** * Render */ render() { return ( <div> This is only viewable by authenticated users. </div> ); } } // Now wrap MyPrivateComponent with the requireAuthentication function export default withAuth(MyPrivateComponent);
Here, we tend to produce a part that's visible solely by users World Health Organization area unit documented. we tend to wrap that part in our withAuthHOC to shield the part from users World Health Organization aren't documented.
Provide Components with Specific StylingBelow are some of the examples by which you can style specifically.
CSS StylesheetInline StylingCSS Modules Styled-
Continuing the components use case higher than,supported no matter UI state you get from the HOC,you'll render specific designs for specific UI states.As an example,if the requirement arises in multiple places for designs like backgroundColor,fontSize so on,they will be provided via a HOC by wrapping the element with one that simply injects props with the particular className.Take an awfully straightforward element that renders “hello” and therefore the name of someone.It takes a reputation prop and a few different prop that may have an effect on the rendered JavaScript XML (JSX).
// A simple component const HelloComponent = ({ name, ...otherProps }) => ( <div {...otherProps}>Hello {name}!/div> );
Let’s create a HOC named withStyling that adds some styling to the “hello” text.
const withStyling = (BaseComponent) => (props) => ( <BaseComponent {...props} style={{ fontWeight: 700, color: 'green' }} /> );
In order to make use of the HOC on our HelloComponent,we wrap the HOC around the component.We create a pure component,named EnhancedHello,and assign the HOC and our HelloComponent,like so:
const EnhancedHello = withStyling(HelloComponent);
To make a change to our HelloComponent,we render the EnhancedHello component:
<EnhancedHello name='World' />
Now, the text in our HelloComponent becomes this:
<div style={{fontWeight: 700, color: 'green' }}>Hello World</div>
Provide A Component With Any Prop You WantThis is a well-liked use case for HOCs.We are able to study our code base and note what reusable prop is required across elements.Then,we are able to have a wrapper HOC to supply those elements with the reusable prop.Let’s use the instance above:
// A simple component const HelloComponent = ({ name, ...otherProps }) => ( <div {...otherProps}>Hello {name}!</div> );
Let’s create a HOC named  withNameChange  that sets a name  prop on a base component to “New Name”.
const withNameChange = (BaseComponent) => (props) => ( <BaseComponent {...props} name='New Name' /> );
In order to use the HOC on our HelloComponent,we wrap the HOC around the component,create a pure component named EnhancedHello2,and assign the HOC and our HelloComponent like so:
const EnhancedHello2 = withNameChange(HelloComponent);
To make a change to our HelloComponent,we can render the EnhancedHello component like so:
<EnhancedHello />
Now, the text in our HelloComponent becomes this:
<div>Hello New World</div>
To change the name prop, all we have to do is this:
<EnhancedHello name='Shedrack' />
The text in our HelloComponent becomes this:
<div>Hello Shedrack</div>
Let’s focus on Building A Higher - Order ComponentIn this section,we'll build a HOC that takes a element that encompasses a name prop,so we'll create use of the name  prop in our HOC.So,generate a brand new
React
app with create-react-app :
npx create-react-app my-app
After it is generated, replace the code in your index.js file with the following snippet.
import React from 'react'; import { render } from 'react-dom'; const Hello = ({ name }) => <h1> Hello {name}! </h1>; function withName(WrappedComponent) { return class extends React.Component { render() { return <WrappedComponent name="Smashing Magazine" {...this.props} />; } }; } const NewComponent = withName(Hello); const App = () => <div> <NewComponent /> </div>; render(<App />, document.getElementById('root'));
Once you have replaced the code in your index.js file,you should see the following on your screen:
Let’s go in detail through the snippet piece by piece.
const Hello = ({ name }) => <h1> Hello {name}! </h1>;
Here,we create a functional component that has a prop called name.In this functional component,we render the “Hello” and the value of the name prop in an h1 tag.
function withName(WrappedComponent) { return class extends React.Component { render() { return <WrappedComponent name="Smashing Magazine" {...this.props} />; } }; }
Above,we tend to produce a higher-order purposeful element named withName().Then, we tend to come associate anonymous category element within that renders the element wrapped within the HOC. and that we assign a price to the prop of the wrapped element.
const NewComponent = withName(Hello);
Here,we have a tendency to produce a replacement element named NewComponent. we have a tendency to use the HOC that we have a tendency to created, and assign thereto the practical element that we have a tendency to created at the beginning of the code base,named hello.
const App = () => <div> <NewComponent /> </div>; render(<App />, document.getElementById('root'));
All we have a tendency to do higher than is making another useful element, named App.It renders the  NewComponent that we have a tendency to upgraded with our HOC in a very div Then,we have a tendency to use the react-dom perform render  to show the element within the browser. That’s all we want to do! Our withName perform takes a element as associate degree argument and returns a HOC. A number of months from currently,if we have a tendency to commit to amendment things around,we have a tendency to solely need to edit our HOC. ConclusionI hope you’ve enjoyed operating through this tutorship.You'll be able to scan a lot of regarding higher-order parts within the references listed below.If you have got any
0 notes
Text
Nabbed - A Sirius x Reader Thief AU
*This is the first Sirius imagine I'm posting, so bear with me on the formatting, etc. As is custom, Y/N is your name. Basically, you are a thief who’s been planning a heist and unfortunately stumble upon a wily Padfoot who’s there to claim your prize. Who knows how you’ll react? I do... ;P*
Tumblr media
The cold air brushes around you, biting your cheeks like an impatient child. You look down into the atrium below, scouting the layout for any visible traps. You’d gone over the floor plan numerous times before this, yet you still felt unsure you were ready for a break-in of this magnitude. Besides, you knew there were other thieves out there who were interested in the very same piece you were. Whispers in the wind spread about who in the “community” was eyeing the prize, but no one so far had made a move. So now, it was your moment. You were meticulous, and your magic gave you an advantage over regular Muggle cat burglars. You slipped your wand out of the sleeve of your black turtleneck and traced a circle on the glass in front of you. It vanished instantly, just large enough of a hole for you to crawl through. All you had to do was cast a rope charm to lower yourself into the area below.
Once you were suspended in air, you sprinkled a handful of magical powder all around you, watching it filter down toward the ground, revealing multiple laser barriers. Easy pickings. “Oy! Who’s dropping dirt on my head? I’ve already claimed this job, what with me being here and all. Why don’t you show yourself and I won’t turn you in, hmm?”  A voice echoed up to you and you silently cursed yourself for not noticing there was someone already on the floor. And apparently, it was another thief who was already trying to steal your prize! You tried to tilt yourself on the rope so you could get a better look at the other person while remaining hidden in the shadows on the ceiling. From what you could see, the other thief was a male, slightly taller than you, his long hair pulled up in a bun to keep it off his face. The moon shining down past you radiated on his pale skin. You narrowed your eyes; no man-bun-wearing amateur was going to best you when you’d been organizing this heist for over a month!
“I seem to be in possession of the upper hand, considering you haven’t found me yet, good sir. I’ve been preparing for quite sometime… you don’t seriously think that I’m going to just hand the box over to the likes of you, do you?” You pursed your lips, trying to sound as intimidating as possible. However, you were startled when the stranger let out a bark of a laugh, and you slipped down your rope a little, your feet dangling in the moonlight. He looked up and noticed, much to your chagrin. He started walking toward you, and although you scrambled valiantly, your gloved hands slipped and sent you plummeting toward the museum floor. You whipped your wand out and waved at the ground, but you fell so quickly that you came right at the other thief. He caught you with ease, but as you were swinging your wand, you slapped him in the face and he nearly buckled at the impact. Luckily, he held steadfastly and you found yourself eye-to-eye with your new rival.
Up close, you were able to examine the man more closely. He looked fairly young, about your age, and there was an intensity about his features, from the hard lines of his aristocratic mouth and nose to the stormy shadows of his grey eyes. You felt somewhat foolish now, with your stereotypical black beanie and cat-eye mask… maybe you were the baby thief after all. He studied your presence for a moment, flushed against his chest with your arms around his neck. Then, he placed you gently on the ground beside him, out of the way of a nearby laser.
“I don’t think seriously most of the time, but I am Sirius, so does that count? Anyway, I believe that since I’ve just saved your life, you owe me an explanation. Or at least your name.” The ghost of a smirk twitches at the corner of his mouth, causing a blush to skitter up from your chest to your cheeks. The man called Sirius reaches out to pull up your mask, but you step backward and almost set off the alarm. Sirius pulls you toward himself instinctively, rescuing you again from another rookie mistake. You sigh and, without looking into his eyes, slip the mask off and tuck it into your black leather pants.
“It’s Y/N. I can’t believe I’m having to be rescued by some hipster thief with a pretty boy face. I had everything sorted and now I’m getting flustered for no reason…” Sirius cracked into a grin now, feigning offense. With your body still inches from his, he tilts your chin up to look into your eyes. You can feel your breath hitch in your throat and mentally curse.
“I have that effect on people, I’m afraid. It’s a curse, honestly, but it’s mine to bear. Also, hipster?! Just because I've got the bright idea to tie my hair up while working doesn’t make me one of those flannel-wearing, coffee-obsessed peacocks. Any self-respecting gentleman thief has to do whatever it takes to get the prize… then again, maybe getting hit in the face by your wand is the prize that I deserve, hmm Y/N?” He chuckles as he pulls out his hair tie, letting his shaggy hair fall to his shoulders with casual elegance. You grimace, pointing your wand into his chest and rotating around him, now closer to the case where the jewel box was held. No matter how attractive Sirius appears, you can’t let him distract you from your goal. You needed that box more than anything right now.
“Oh boo hoo, poor you. It must be very difficult to be taken Siriusly when you look like that. Is that why you’re playing robber? If you like getting hit by my wand, I’m sure I can arrange to do it again… wait, you know what this is?!” You lower your wand slightly, pointing it in the direction of his pelvis in case he tries anything untoward. His eyes narrow as he continues to smirk at you, almost menacing. He backs you closer to the box display case, his stalking gate like a predator cornering its prey. Your eyes widen slightly as your brain finally processes that this thief is also a wizard who is slowly gaining the upper hand.
“Are you really surprised that the only two thieves who’ve made it this far are wizards? Honestly, I’m impressed that you’re a witch because you’re about as clumsy as a Muggle. Clumsy and joking with puns. Who’s playing now?” Sirius moves closer to you, trailing his fingers up your outstretched wand. This is your moment, no matter how much fear is prickling at the back of your neck. You mutter an incantation and, with a surprisingly-graceful flourish, you plunge your hand through the glass case surrounding the box and clasp a hand around it.
Sirius is finally startled, forced to relinquish his grip on you as you swing around. You ignore him, focusing all of your energy on phasing the box through the now liquid surface of the case. It’s a bit heavier than you imagined, but you manage to wrench it through without a hitch. Sirius just stands behind you, transfixed, as you levitate the box in front of you. When that’s done, you reach into the pack strapped at your waist and fiddle around for something. In a moment, you pull out a small wooden box, not very unlike the jeweled box you removed. You pass your wand over the surface, casting a disguising spell before neatly sliding the object into the place where the treasure sat. You pull the box out of the air and turn back to Sirius, who has finally come to and is staring at you in awe. You raise your eyebrow at him haughtily. He smiles.
“Okay, maybe you’re not so green after all, Y/N. How about I make you a proposition for the box… I imagine you want it because you’re going to sell it to the highest bidder. Fair. What if... we worked together to get an even bigger haul, and sell the whole lot for a castle’s worth of fortune? You may have pulled that off right in front of me, but without me here, you would’ve gotten caught at least twice. I think we’d make a pretty good team, and, as you can tell, I’m a rather agreeable gentleman.” Sirius holds a hand out to you, palm facing up to appear less deceptive. You eye him warily; just a few moments ago, this other wizard had tried to corner you and intimidate you… who was to say he wouldn’t turn around and betray you as soon as you let your guard down. Still, he was right that he’d rescued you. Sirius could have just let you fall, take the box for himself, and left you to take the blame. Perhaps he had acted instinctively during the whole situation, from saving you to stalking you. There was something slightly off about him, like an animal who’d been caged for some time who was every second deciding whether it needed to exact revenge. You didn’t know if you could trust him, but the sincerity glinting in his eyes began to melt away some of your doubt.
“You should never underestimate a cornered cat burglar… she might just transfigure into a lion. I’m not going to pretend I trust you, Sirius whomever you are. But I admit that I appreciate you not letting me die within the span of about 10 minutes, so… I’ll hear your proposal, but not here. I keep the box. You set up the meeting, and I’ll be there. A gentleman can surely take the word of a lady, can’t he?” You press your hand into his, still clutching the box to your chest in the other. A wan smile spreads across his lips, amusement dancing in his dusky gaze. Once more, he moves toward you, this time more gently padding to close the proximity. He looks down at you, flicking his tongue out across his bottom lip pointedly. Your hand tightens on your prize, unsure whether he’s going to make a move on it.
“Okay Y/N, I’ll prove to you that I’m right. A lady’s honor is unquestionable. But… as a gentleman, I suppose I owe you a display of loyalty. Meet me at the Leaky Cauldron entrance to Diagon Alley. Tomorrow at this time; bring the box in your handy little pack.” Sirius leans his head down imperceptibly and, without warning, presses his lips against yours in a chaste kiss. You’re completely caught off guard, but your body reacts separately, returning it with some dash of fervor. He is still holding your hand as he steps backward with you, and his heel strikes into a laser with all the might of Achilles. A bell shrills through the air, breaking the two of you apart. You stare at each other in horror for a moment, as Sirius swears at his stupidity in getting distracted.
“Tomorrow, the brick wall, 11 o’clock. I’ll be there, Sirius. Make a convincing argument, will you, m’lord?” You sweep a leg behind you with a mock curtsey, which brings the light back to his face. He nods, his feet starting to dematerialize right in front of you.
“Until tomorrow, beautiful Y/N…” He whispers across the distance between you, then disappears like a candle winking out. You take that as your cue to leave, and disapparate from the spot, focusing on the vision of your flat’s balcony a few blocks away. You reopen your eyes after the sickening feeling has passed, and you’re perched on the railing of your balcony. Wrapping your legs comfortably to ensure your balance, you run your fingers over your lips, replaying the feeling of Sirius’ soft mouth on yours. You raise your face toward the moon. “See you tomorrow, Sirius.”
Let me know if you liked the story in the comments, if you want to read more stuff, and any other thoughts. I feel like it’s not as fully developed as I would like, but this is my first attempt at an x reader fic. And honestly, it’s a little PG for my taste, but I wanted to let Sirius’ imagined personality blossom slowly, just like my love for Ben Barnes every time he shows up on my television. ;P  Thanks for tuning in and maybe I’ll come up with more soon! xx Bri P.S. This is dedicated to my new friend @wizardwritings who writes really great fics and inspired me to try my hand at writing imagines, so if you haven’t read her stuff, definitely do!
50 notes · View notes
aceb · 3 years
Text
Layers
Tumblr media
"Point, line, and plane are the building blocks of design." (Lupton 33) The point can be defined as a mark in a position of space. A line can be described as a single point that continues for a distance, or as the connection between two points. The purpose of a line in graphics is to help the artist to communicate to the viewers what it is they are supposed to be seeing or taking notice of. Layers can create a sense of depth in an image with point, line, and planes. Layers are the different levels at which one can place an image. Layers can be stacked, merged, or defined when creating a digital image. In this design, I used both point, line, and plane and layers as a way to create a nostalgic image. The person in the image is an African American singer and songwriter named is Frank Ocean. He is best known for his song “Thinking About You” on Channel Orange created in 2012. The reason I decided to draw him is his music speaks to me differently than anything I’ve heard before, you can say he is one of my favorite artist. I wanted my favorite artist to be in many favorite city, so I choose Mount Fuji in Japan.
Rhythm and Balance
Tumblr media
In this design, I explored the power of perception or the ability to see, hear, or become aware of something through the senses. The words I choose to explore was the famous hashtag started by black Twitter “BLM’. BLM stands for “Black Lives Matters” which is a decentralized political and social movement advocating for non-violent civil disobedience in protest against incidents of police brutality and all racially motivated violence against black people. I wanted to emphasize the issue of Black lives to raise awareness of the death of innocent black bodies in America. I used a black woman as the face of this design to show the power of the black women’s role in the movement. Most of the time a black woman is defending herself and others on the front line. As Lupton said, “By exploiting the brain’s capacity to find and create order, designers construct simple, direct logos, layouts, and interfaces. In addition to seeking out clear, direct communication solutions, they can also use the processes of perception to invent surprising forms that challenge viewers to fill in the gaps.” (265) I wanted to challenge the viewer to fill in the gaps and think about why BLM is important to them by boldly presented the issue. I used eye contact as a way to manipulate perception as well.
Color
Tumblr media
The perception of color depends on how the color is presented, the brightness, and the character of light. We can also perceive a given color in relation to the other colors. “Color can convey a mood, describe reality, or codify information. “Words like “gloomy,” “drab,” and “glittering” each bring to mind a general climate of colors, a palette of relationships. Designers use color to make some things stand out (warning signs) and to make other things disappear (camouflage).” (208) When creating the art based on Immigration and Native American land I thought about politics. During the election month, America seems to be divided into two. I wanted this design to bring awareness to the divide and create a central understanding. To create relationships between color and monotones I used the color red to emphasize the blood of millions of Native Americans and blue to express the beauty and pride that still exists. I used monotone green to create a feeling of warmness.
Boarders
Tumblr media
A border is a design that runs lengthwise along the edge of a design.“Whether simple or decorative, a border creates a transition between image and background. Against the pale wall of a room, for example, a black picture frame sharply separates a work of art from its surroundings. Alternatively, a frame whose color is close to that of the wall blends the work of art with the room around it.” (Lupton 364) The purpose of my boarder was to emphasize my design of the Amur Leopards. These animals are one of the top ten animals to go extinct. The Amur leopard is threatened by poaching, habitat loss, and deforestation or of their land. Their natural habitat is also threatened by forest fires and the construction of new roads. I choose a black border to express boldness. I also juxtaposed the image to make a point that they're endangered.
Gestalt Principles
Tumblr media
(5) Gestalt principals. Gestalt principles include similarity, continuation, closure, proximity, ground, symmetry, and order. “Building on memory and experience, the brain fills in gaps and filters out extraneous data.” (p. 99) Gestalt theory emphasizes that anything is greater than its parts. Gestalt principles can elevate a design that seems like it's fighting for a user's attention to one that offers a natural interaction that makes your design feel familiar while guiding users toward the action you want them to see. The goal of Gestalt’s theory is to teach people to become aware of sensations within themselves and their environment so that they respond reasonably to a situations. In this design, I used this Ghanises woman to communicate beautiful and pain. The interpretations could go in many directions but one thing you cant deny is the Ghanises flag behind her. In this flag, the star would normally be in the middle. However, she is the star. Her heart shines bright but her skin is brighter.
Frame
Tumblr media
Framing is the presentation of visual elements in an image about other objects. Indeed, balance is a prized commodity in our culture, and it is no surprise that our implicit, intuitive relationship with it has equipped us to sense balance--or imbalance--in the things we see, hear, smell, taste, and touch.” (p. 49) Framing can make an image more aesthetically pleasing and keep the viewer's eye focused on the framed objects. “A frame can serve to either emphasize or downplay its contents.” (p. 125) In this design, I used the frame to make the perception of the camera looking down. The jacket as well as flying plane is meant to catch the viewers eye first. Jacques Derrida defined framing as a structure that is both present and absent. The frame is subservient to the content it surrounds, disappearing as we focus on the image or object on view. The mechanical eye tends to cut the camera into fields of vision. The point of this frame is to look deeper into the mind of the person in the image. The statement is that the person is at a higher level of thinking, his mind is open. This frame created a condition for better understanding of the image.
Transparency
Tumblr media
In design, transparency can be defined as something that is nearly or completely invisible. Words, pictures, and textures can all become transparent. Lupe suggests that “…transparency suggests clarity and directness.” Yet in design, transparency is often used to create dense, layered imagery built from color and texture. In this design I used a brand name I’ve been experimenting with called “fade away”. Fade away represents the fading of the mind from the world in order to elevate and become closer with the universe. “Transparency means a simultaneous perception of different spatial locations. . . . The position of the transparent figures has equivocal meaning as one sees each figure now as the closer, now as the farther one” Gyorgy Kepes”. (Lupton 451) Transparency is often used not for the purposes of clarity, but to create dense, layered imagery built from veils of color and textures. I lowered the opacity to 17 and added red lettering to a black background to make the words stand out.
Diagram
Tumblr media
This diagram design was inspired by anime styled drawing in a series called “Monster’’. A diagram is a simplified drawing showing the appearance, structure, or workings of a design in a schematic structure. “Diagrams allow us to see relationships that would not come forward in a straight list of numbers or a verbal description.” (Lupton 215) This diagram has both words and pictures laying out more background information. The words directly respond to the image falling under the category of either good or bad. I wanted to explore the visual aspect of the words “good” and “bad”. I used angel to represent good and devil to represent bad. Though a simple style the message was still able to be understood. The overarching message of the image was that love is above all. In all images love has been presented in some way or form. Diagrams add a layer of detail to a design that can make it look more professional.
Grid
Tumblr media
(8) Grid. In graphic design, a grid is a structure made up of intersecting straight or curved lines used to structure content. Grids are tools for organizing space, text, images, and other elements placed in a design. Grids add structure to a design. They lead to rational standardized systems that help people absorb the information trying to be communicated. The grid serves as an framework on which a designer can organize graphic elements in a rational manner. Grids allow designers to add elements to a layout while using the grid structure. In this design, I wanted the theme to be digital so I used colors like deep blue, red, and yellow. The Grid also gives this design a digital feel with horizontal, vertical, curved, and straight lines. The lines give depth to the image but also gives the image a 3D effect.
Motion
Tumblr media
Motion is one of the most exciting aspects in graphic design. “Motion is a kind of change, and change takes place in time. Motion can be implied as well as literal…” (Lupton 233) Motion in graphic design is often used in the film industry with Openings to movies, television shows, and news programs can use photography to make the introduction. In this design I used motion to show the process of a seed growing. Before the seed grew, it rained, the sun came out, and once the seed finished growing a flower bloomed. This process is not easy it involves patience and time. Motion graphics are pieces of animation or digital footage that create an illusion of motion or rotation. Animation is my favorite form of motion. The design is all hand drawn using the flip book method. The flip book method is basically taking multiple flashcards and combining them by flipping them to create the illusion of motion.
0 notes
Text
4 FREE Ways for Spying On Your Competition’s SEO
It doesn’t have to be difficult or complicated to get started on an SEO journey.
Not knowing where to start is a normal feeling to have, and a lot of times can put you off from starting.
For starters, you have competition who likely motivated you to begin taking SEO seriously.
That means they have a head start on you.
Don’t worry – that’s excellent news.
Having competition who had a head start with SEO makes your life easier.
You should send them a thank you card for making your life easier. All you need to do now is emulate and improve on their strategy.
It’s easy to do once you have the right tools, and you know what to look for.
For our SEO Services, we use tools like ahrefs and SEMrush, which both start at $99 a month, and we pay way more than that.
We have to afford to do that because SEO and content marketing is what we do.
You don’t have to break the bank upfront to begin your SEO strategy. You can get started for free.
We’re going to explore how you can leverage free tools to look at your competitor’s strategy on each of these fronts:
What Keywords They Rank For
What Content Is Working Best
What Search Terms Are Profitable
How Often They Post
What Titles You Should Use
If you were going to try to figure this out all on your own, you would be reading a handful of SEO guides and would likely be persuaded to buy unnecessary tools.
You would be getting conflicting advice and self-serving recommendations.
I was there when I was first learning, and I have to admit I likely lined someone else’s pockets because they pushed a tool that I didn’t need (yet).
I don’t want you to waste time or money I did.
That’s why I’ve created this guide to uncovering your competition’s SEO strategy with free tools.
youtube
#1: WordPress SiteMap
According to Whois Hosting This, 455,000,000 self-hosted websites are on the WordPress platform.
Odds are your competitor’s website is on WordPress also. Of those websites, they’re likely one of the 7,412,434 sites using the Yoast plugin.
What you can take advantage of is that Yoast has the same URL structure for every sitemap.
A sitemap is a blueprint that shows Google crawlers, where every page on your website is to help Google crawl your site faster.
We take advantage of this by quickly uncovering pages and categories a website uses.
The way to get to a website’s site map is to type in their domain like this:
competitor.com/sitemap.xml
You should see something like this come up next:
Tumblr media
Looking at a sitemap could get overwhelming for a large website, but for smaller or local sites, it’s a great way to uncover service location pages.
#2 Ubersuggest
I cannot speak highly enough about UberSuggest. UberSuggest is the tool I wish I had when I first began my SEO and Content Marketing Journey.
Before UberSuggest, I had to pay for tools like ahrefs and SEMrush (when I couldn’t afford it) and scraped by to get access.
Neil Patel put together a tool that’s 100% free to use and gives the services above a run for their money.
In case you don’t know, Neil is one of the world’s leading SEO/Content Marketers.
I learned the majority of my content marketing and SEO techniques by working directly with Neil and his team.
Some of the advice here actually comes straight from him (sorry, Niel :-P).
Ok, let’s get into the nuts and bolts of how to use UberSuggest to it’s fullest.
Steal your competition’s keywords
Take your competitor’s URL and paste it into the search bar on the screen.
Tumblr media
The first thing you’re going to see is your competitor’s SEO stats like traffic, keywords, domain score, and backlinks.
Tumblr media
Click on top pages to see what content is performing the best for them.
Once the page loads, click on view all under the Estimated Visits column, and now you’ve uncovered all of the keywords that page is showing up for in Google.
Now you can go through their best pages and start to place them into your keyword research document.
Now create content that targets these keywords and create something better than what your competition created.
Steal their backlinks
Backlinks are when a website cites your website for information. Think of it as a vote for your content.
These votes get tallied by Google to establish how trustworthy your website is.
Not all votes are created equal, though. The more relevant the citating website is to your niche, the more influential the vote.
How are you supposed to find relevant websites out of the 1.74 billion sites that exist on the internet, according to Web Hosting Rating?
That’s easy, under the backlinks column on the same screen, press View All and it provides you with a list of everyone who’s linked to the content.
You know the keywords already, and you’ve created content that is better than their content.
It’s time to approach the websites which are linking to your competitor and say something along the lines of:
“Hey, Website Owner – I noticed you are linking to an outdated blog post about XYZ. I recently expanded and updated that topic to be more current, and I think your visitors will appreciate the most up to date info.”
On the surface, this might not sound that exciting, but consider this.
Your competitor didn��t know who would link to them and likely reached out to 100’s of people to get those links.
They’ve done the hard work for you by finding these websites interested in the blog post.
If your content is better, up to date, and expanded, they have no reason not to link to you.
You’ve now successfully stolen a link from your competitor.
Tumblr media
 It’s time to approach the websites which are linking to your competitor and say something along the lines of:
“Hey, Website Owner – I noticed you are linking to an outdated blog post about XYZ. I recently expanded and updated that topic to be more current, and I think your visitors will appreciate the most up to date info.”
On the surface, this might not sound that exciting, but consider this.
Your competitor didn’t know who would link to them and likely reached out to 100’s of people to get those links.
They’ve done the hard work for you by finding these websites interested in the blog post.
If your content is better, up to date, and expanded, they have no reason not to link to you.
You’ve now successfully stolen a link from your competitor.
#3 Screaming Frog
This next trick will show you which pages are most important to your competitor.
We are going to use a program called Screaming Frog.
Screaming Frog is a software that crawls your website or your competitors in this case and gives you a bunch of information.
When you first see the information, it can be overwhelming because you likely won’t know what most of it means.
That’s ok because we want to gather the purposeful information.
In this case, the purposeful information we are looking for is what pages matter most to your competition.
Download Screaming Frog to your computer then launch and type in your competitor’s URL:
Tumblr media
Go to the filter button and select HTML. Scroll to the right until you find the column “InLinks” and sort it from highest to lowest.
At the top of the list will be the pages that your competitors internally link to the most.
Think of your competitor’s site as if it were a museum or amusement park. Once you get in, you can’t get out without going through the gift shop first, where you might spend some money.
The concept is the same when it comes to websites. Your competition is going to do their best to guide their visitors to the pages where they can pitch their products.
Once you uncover these pages, you can see what their offer is and how they’re making the offer. From there, you can emulate their layout, sales angle, and calls to action.
#4 Google
How many times have you heard, “Google it?”
According to Hubspot, they estimate Google handles 5.8 BILLION searches a day.
Odds are you’ve likely heard the phrase once or twice a week. Well, keeping up with your competition is not different.
What we are going to show you is how often your competitor is creating content for their website.
Most people don’t know this, but You can dictate how Google performs your searches with special commands.
Here’s how you do it:
First type into Google’s search box, your competitor’s URL with “site:” in front of it.
Tumblr media
The command told Google you want to limit all the results to your competitor’s domain only.
Once the results come up, under the search bar, you can to click on the tools button.
Once you’ve done that, you’ll see two more buttons appear, “Any Time” and “All Results.”
Tumblr media
This shows you the amount of effort your competition is putting into SEO by how frequently they’re posting to their website.
From here, you have a few choices.
You can decide if you want to match, exceed, or do a little less than what your competition is doing.
There is no right answer here because, ultimately, frequency, along with quality, and many more factors play into Google rankings.
If you have the resources to meet or increase the frequency of your competition’s production rate, I would suggest it.
If you cannot, don’t sweat it. Just make sure you remain consistent and provide quality content.
#5 Ngram Analyzer
Ngram analyzer is an online analyzer that helps you take a handful of titles and find patterns.
What it does is it looks through the titles, and you ask it find strings of words that often go together.
Ngram Analyzer will provide you with is an idea of what type of content your competition is creating and how they are titling their content.
With the help of UberSuggest, we can export all of the top pieces of content to excel.
Copy all the titles from Excel and paste them into Ngram Analyzer.
I first start very narrow and use 4grams, which is a string of four words that are together more than once.
Tumblr media
You should see results like this, which are terms and the number of times they show together.
Tumblr media
In this example, you can see phrases like “is transportation and logistics” and “transportation and logistics management” are important to them because they string them together a lot.
You can go further by broadening the criteria to 3gram and 2gram to see if you can gain any more insights.
You should see results like this, which are terms and the number of times they show together.
Conclusion
You may not be an expert in SEO, and that’s ok because you don’t have to be to develop a decent strategy.
If you know how to spy on your competitors for free, you can see what’s working for them.
Use the free tools we mentioned above, along with my strategies, and you’ll quickly uncover what they are doing right.
The post 4 FREE Ways for Spying On Your Competition’s SEO appeared first on Joseph Paul Digital Agency.
0 notes
niharblr · 5 years
Text
Designing Search and Filter
Tumblr media
Introduction
The Internet is a bustling marketplace, complete with flashy category shelves, colorful slogans, and gravity-defying ‘value’ deals. In fact, the Internet can be considered an endless supermarket; the virtual counters of an online store or resource library boast of more options than a large retail outlet ever can! However, these economies of scale come with a few daunting challenges. One of these limitations is ‘search’. Searching for a product online and actually finding it in the vast abyss of virtual shelves, from across millions of product types, sizes, prices, colors, geographical variations, and many other such considerations is actually a Herculean task. An efficient search and filter criteria can make all the difference in conversion.
Why is ‘Search’ relevant?
Tumblr media
To put it simply, you can’t sell a product that your customers can’t find. Search is a fundamental mobile activity and a critical element of building a profitable app or site. Users expect smooth in-app experiences when they are browsing for products with the intention of making a purchase. The app interface must assist the user in finding the product or service without encountering too many navigational obstructions. Data suggests that users typically make very quick judgments about the application’s value based on the quality of one or two sets of search results. A search facility should help users find what they want quickly and easily.
Search is Contextual
Users browse product or service-oriented websites and apps in the pursuit of something. The search function must be efficient enough to connect the user to the object of their desire.
Let’s take two examples to compare the ‘Search’ function of two leading consumer-facing applications:
Netflix:All users who log in to the widely popular content streaming website, Netflix, are looking for something to watch. But since Netflix is an endless library of viewable content, how does the user find what they are looking for. The answer lies in the dynamic search bar. Positioned on the top-right corner of the homepage is the search criteria;  it allows users to search for a movie based on their mood or choice by providing certain set of filters such as style, genres, language et cetera. The user intent is captured there.
Tumblr media
Netflix gives related titles along with the list of movies populating below - all curated through search patterns analyzed by Netflix. Hence, Netflix drives users to exactly what they are looking for leading to quick decision-making.
Medium: On the other hand, the search function on Medium could do with a little tweaking. The prompts in the search field do not direct the user with the method of the search and a new user can easily get confused on how to navigate the website for content. Medium must streamline the search function to reduce the cognitive load on the user.
There are two key areas of consideration when it comes to designing the ‘Search’ functionality in an app: Search box design and Result pages; lets's dig into them further
Search Box Design
A search box is a combination of an input field and the submit button. Since the search box is one of the most frequently used design elements on content-heavy websites/applications, its usability is critical. Let’s look into the basic sets of recommended practices to be followed for Search box design:
One very important rule in search box design is its placement. The intention is to make the search function easily noticeable. Especially, where the search is an important function, it should be upfront, as it might serve as the fastest route to discovery. Search hidden under navigations or under icons has negative consequences. Below are the points to consider while placing your search field:
Prominently Display The Search Field
As a thumb rule search box should be the first or the second thing a user should see when they open the app. They need not necessarily be full length or wide open. To decide which style of search box to adopt, one needs to analyze the user motivation/goal for using that app. The placement of the search bar is dependent on the nature of the website and the product or services they offer. Let’s review the search option in some leading websites.
Google
The primary goal of Google is search. Hence, the search engine has a wide search bar placed strategically in the middle of the page.
Tumblr media
Amazon
The primary goal of users on Amazon is not search. A lot of users on e-commerce sites browse for products. Hence, the website has a visible search bar but not a full-width search box.
Tumblr media
Pinterest
Interestingly Pinterest has a different approach for both mobile and web interfaces. The web has a wide-open search box along with a few other options, but the mobile interface has an icon-only search approach. This is because most users on Pinterest browse creations rather than searching for a specific thing.
Tumblr media
In shorts
With inshorts, a different scenario manifests; the purpose of this application is to help users with a quick understanding of the news categories of their liking. The app identifies the interest areas of the users during the onboarding process itself. In case a user wants to search anything they tap on the ‘Discovery’ bar leading to search for news based on any categories/topics.
Tumblr media
Proper Size of Input field
The size of the input field is an important area for deliberation as it directly affects the usability of the app. Data suggests that 90% of the search queries are approximately 27 characters in length; this metric can be used as a yardstick while deciding the length of the input field.
Use magnifying-glass icon
Tumblr media
The magnifying glass icon is the universal symbol of search. Using the common and easily identifiable context reduces the cognitive load from users and helps them in quick understanding. We suggest to use the simplest version of the magnifying glass, not everything needs to be innovated!
Provide a search button for the search box
Typing out a query in the input field must be complemented by a trigger action, ie, pressing the search button. A button helps people recognize that there’s an additional step to trigger the search action.
Tumblr media
While designing the button, two considerations have to be taken; first, the button must be sized appropriately, so that users don’t have to point the mouse very precisely on a certain spot. A larger clickable area makes it easier to spot and to click. Second, to let users submit a search query using the ‘Enter’ button on the keyboard as well as on clicking the icon. Many users still have the habit of clicking an actual button to submit the search.
Prompt what users search for (hint text)
Tumblr media
It’s a good practice to let users know what all they can search for. It’s advisable to include a hint text in the input field to serve as examples of how queries can be worded. While designing the prompt, limit your hint to just a few words; remember we don’t want to overwhelm our users.
Use the auto-suggestion mechanism
Tumblr media
We all love the query suggestions that Google throws on us while searching, it’s just easier, ain’t it? In most websites/apps that include search as a key function, formulating a search query includes a specific logic or algorithm. Autosuggestion feature not only reduces keystrokes but also suggest more accurate terms to enable the users’ search process.
Show recent searches
Tumblr media
A key usability rule in user experience dictates that we as designers, respect the users’ effort. Apps should store all recent searches, in order to provide this data to the user the next time they conduct a search. It saves screen-time and effort in searching for the same item again and increases conversion.
Result Pages
The results page is a crucial piece of the puzzle and defines the search experience for the app. Here are some effective pointers for delivering a functional ‘results’ page.
Retain the users’ search query even after the initial ‘Search’
Data suggests that most users will not find accurate search results in the first try and will hence, try to search again by making slight modifications to the original query. For the sake of simplicity, leave the initial search term in the search box so that users don’t have to re-type the entire query again.
For example, Youtube retains users' search queries after they have submitted their search request (Good experience) while Amazon erases the same (poor experience). As per the usability principle of design, Youtube ranks higher than the e-commerce giant since it prevents the duplication of user effort to look for items on the site. Youtube saves recent searches as well as content that is frequently searched by an individual user to suggest customized playlists for their target audience.
Select a proper layout for your data
Search is no longer restricted to text. The layout of search pages must suit the content that it seeks to display. Two popular layouts for content presentation are:
List view: This format is better suited to display text-based search results with details of different articles or listicles arranged in the order of relevance. This layout format is also preferred for technical products that involve technical information in the summary to aid users’ decision-making process. Google employs the list view for its traditional keyword-based search.
Tumblr media
Grid view: This layout is suitable for any application that is visual or image-oriented. A popular example of the grid view layout is Instagram which is primarily an image sharing platform for its registered users. This layout is largely preferred by lifestyle and apparel retailers who seek to create visual distinctions between items to enable a healthy differentiation between their products.
Tip:Allow users to choose ‘list-view’ or ‘grid-view’ for search results. This gives your users the ability to choose how they view their results in a way preferable to them. Soundcloud is a good example of this hybrid approach.
Display the number of matching results
The result pages must display all the relevant matches to the search query entered in decreasing order of relevance with the most accurate search results on top. If your design can showcase the total search results, the number of search items available; Users can make informed decisions on how long they want to spend looking through results. This has been nailed by company Awwwards as they display the search matches by type, relevance and reach on the top of the page.
Show search progress
The average attention span of a human being is depleting as we speak. Data suggests that in this day and age of constant digital bombarding, our ability to direct our attention on something is down to 8 seconds of focus time. This makes it crucial for us as designers to not only build systems that deliver results faster, if not immediately, but also display a progress indicator to keep the user engrossed. This gives them a clear indication of how long they have to wait, while we collate results behind the scenes.
If the search takes more than 10 seconds, its advisable to use animation. Fine animation can distract your users and make them ignore long searching times. Here are two techniques that work:
Using Micro-interactions: Using illustrations, animations, and small games are fun ways to keep users engaged as the result page loads. Paytm flight search animation would be a good example.
Tumblr media
Lazy Loading: As the name suggests, lazy loading is a technique that loads partial results while the entire gamut of matched results are in the process of being delivered. Since the initial content to be displayed is limited, the initial page is loaded quickly which keeps the user engaged while the rest is retrieved for display. A few e-commerce websites use this method actively.
Tumblr media
Don’t show ‘’No results’’
Tumblr media
As a user, nothing can be quite as frustrating as the search query delivering zero relevant results. This is especially true for someone if they have tried multiple times without success. Here’s how you can navigate this situation without aggravating the end user.
Clearly explain that there are no matching results.
Offer starting points for moving forward. An e-commerce store can suggest related products from similar categories on the no-results page.
Sorting and filtering
Sort and filter options are the unsung saviors of online search. Sifting through a plethora of options online enlisted one after the other can be an exhausting task; filters simplify this task by narrowing the displayed results to reflect items as per the user’s need and not the entire universe of ‘related’ products. Filter & sort options are the sub-elements of any search as they can help users narrow and organize their search results, which otherwise requires extensive scrolling or pagination on a small screen.
However, it’s important not to overwhelm users with too many options. If your search requires a lot of filters, then some of these filters should collapse by default. Also, once the filter/sort is applied by the user then a button called ‘Reset Filters’ or ‘’Clear All’’ should be given next to the filters/sort so that the user can quickly make changes.
Conclusion
Search is a crucial, complex, and expensive feature. It has the potential to make or break an app because it serves as an important experience tool for the users. With the ever-changing technology, let’s embrace ourselves into a completely new world of search design. Today search is no longer limited to text; different formats of search queries can be submitted in a search box in any application/website. Are we ready for it and thinking about them? Below are some examples of popular alternative search formats, do let us know what are your design techniques for them.
Voice Search: Voice search uses the power of speech recognition to search the web instead of the traditional typed text. It is becoming an increasingly popular technique as it saves a lot of effort and time.
Tumblr media
Reverse Image Search: Unlike traditional search which requires accuracy in both recognizing relevant keywords as well as designing a search query, the reverse image search is a mechanism that relies entirely on images. It is characterized by a lack of search terms. Reverse image search also allows users to discover content that is related to a specific sample image and locate the source of the image for various purposes of use. These images when discovered via search queries can provide links to the content creator and their other work.  
Tumblr media
Image Pattern Recognition (Eg: Google lens): Google lens is another type of example when it comes to various types of searches. Instead of simply identifying what an object is, Google Lens can understand the context of the subject. So if you take a picture of a flower, Google Lens will not just identify the flower, but provide you with other helpful information, like where there are florists in your area. It also does useful things like scanning QR codes, copying written text, and even live translation of other languages.
Tumblr media
Music Recognition Search (Eg: Shazam, SoundHound, Musixmatch lyrics): Shazam, Sound Hound, Musixmatch lyrics are those applications that help users to search/figure out the name of a catchy song being played on the radio, television or other place. Users simply hold their device up to the speaker playing music and these applications will attempt to identify the tune's album, artist and song title.
Tumblr media
      For more interesting blogs visit us :Lollypop blogs
0 notes
makebecool · 5 years
Text
7 A/B Testing Ideas to Boost Conversions
Online store owners seek how to increase the flow of visitors to their sites, to turn potential customers into valid ones, and, accordingly, to increase their sales. In this review, we will show you how helpful A/B testing can be in this case.
The most important goal of landing page A/B testing is to give you understand if it is convenient for a user to deal with your online store. Basing on the test results, you will see the weaknesses of your site and figure out what needs to be improved that it worked better.
Before experimenting with your online store, make sure that Google Analytics can track your conversions and that Google Tag Manager is properly configured and tracks the events and actions you need.
What is A/B testing?
A/B tests also known as split testing or bucket testing are the way to test hypotheses for improving a page, attracting and retaining customers.
You can achieve the following results:
improvement of your online store usability;
smaller numbers of users who leave your site;
acceleration of the process of making purchasing decisions.
How to conduct a split test or A/B testing?
The idea of type a or b personality test is very simple. The site users are randomly divided into segments. One of the segments remains unchanged - this is the “A” control segment; we assess the effect of the changes made on the basis of the data for this segment. Users from the “B” segment are shown the modified version of the site. After we compare the results and analyze the data obtained. It's simple, isn’t it? Let's analyze the details of this process.
A/B Testing Ideas to Boost Conversions
There are several options for testing the hypothesis.
1. AB testing - there are 2 versions of this page: Checklist and Modified version. We can correct the page in simple editors such as VWO, Optimizely, Google Optimize.
2. Multivariate test - there are several options for the control page.
3. Split test -  it is a completely different page design, which is valid on page/v2.
How and where do we work with A/B tests on Shopify:
first of all, we determine the user traffic and conversion rate. Then, using a special calculator, we look for how long we need to conduct the experiment. At this link, you can find more information about the calculator: conversionxl.com;
next, we use ab testing website optimizer such as Google Optimize, or Visual Website Optimizer (but it is on a fee basis, so most often it uses Google), we create a test;
we check the results using a Chi-square calculator. If the value of p <0.05, then with 95% confidence we can say that thanks to these changes, sales or user involvement have grown. The greater the value is, the more difficult it is to determine the reason for the victory of one or another option.
Most importantly, the A/B testing allows you to validate the hypotheses and reduces the risk of financial losses spent on a redesign.
Which elements can you include in ab testing process?
1. Site Navigation
Tumblr media
Navigation is one of the key parts of the site. It largely defines how the visitors will use your site. Here we are testing the menu, mega menu, brand selection, adding tabs, bread crumbs - if not, then they are required. You can test their size and content, products catalogization - whether the goods are located in the collections where users expect to see them.
What for? Depending on your audience, you need to decide how it is more convenient for them to choose and find a product, and what they do - as soon as they come to your website, where they are looking for, where they find it, and where they don’t. Perhaps it will be more convenient for them to search through visual content, won’t it?
Try to resize the search bar to improve the usability of your online store.
Check the navigation bar display. Do site visitors prefer horizontal or vertical orientation?
2. Text content
Tumblr media
The text content of an online store includes headlines, subheadings, product descriptions, a list of customer benefits, reviews and more. Using these elements you give your client the most important information that influences his subsequent decisions. That is why text elements can and should be tested.
We are testing options for presenting information, for example, on the product card - tabs or dropdowns, how it is better to make a description and where to place it.
What for? Perhaps most of your users do not like to read long descriptions, they are only interested in brief product specifications, as well as the terms of shipment and payment. An equally important component is the sequence of content. You can get that info through A/B tests, sometimes adding a few lines to the description or reducing redundant text may increase your conversions.
3. Visual content
Tumblr media
Visual content attracts the attention of visitors much more than the textual one. Therefore, it makes sense to experiment with different photos, try descriptive videos, 3D models.
What for? Perhaps you have a problem in the presentation of visual content. It doesn’t have much to do with your product or doesn’t fully disclose it, the quality of the image and video is very bad - it affects the credibility of your site and product.
You tried the video instead of the banner - but it doesn't work, why? Most likely your users feel uncomfortable to watch the video at a certain moment of the day. Here are some tips about video content: of course, everyone says that the video is the future of effective sales and advertising. However, this will work effectively only if your video is loaded quickly when a client is connected to Wi-Fi and when he uses his mobile Internet. Take care of the content downloading speed, and optimize it. Slow content loading annoys your users and forces them to leave your page.
Test different versions of the product image on the product page. Change the size of the product photo, it's location and targeting format. If the product picture is too small, the user will not consider all its features and will go to your competitors’ site to look for better visualization. Remember that each user is 30-50% skeptical of you, and he also heard from his friends that the goods they received did not correspond to reality.
4. СТА-blocks
Tumblr media
The CTA button is a call-to-action button. Such elements are on almost every site. They are one of the most important in the sales funnel: they click them to go from one stage to another.
It also happens that among many other elements the CTA button is not particularly visible to the user - try to specify it so that it is focused. Try different colors, shapes, and sizes of CTA buttons on your site. Note that the text on the button is well-read against the background.
Test the various states of CTA guidance so that it is more obvious that the buttons are pressed and they create a feeling of interactivity on the page.
Try to reposition the CTA buttons to make some CTAs more visible than others. If the button is located at the bottom of the page, place it in the part of the screen that is visible at once, because many users do not get to the end of the page.
Change the call-to-action text on your buttons to see which word or phrase converts more visitors. Instead of “Order now” try “Buy now”, instead of “Download” - “Get it for free”. In this case, note that the button text must correspond to the result that the user will receive after he clicks it.
Your website allows customers to perform just targeted actions: to buy, to register, to download, to subscribe, to share, etc. The user will do what you ask for. However, before you motivate a client to take an action, check the correctness of your calls to action.
One more useful advice: if you advertise your products only with the help of Facebook advertising, check that the Facebook pixel on your site is working correctly. This is important since you need to know which CTA units motivate you to perform a targeted action, and which exist for nice design only. Also, if this tool is installed correctly, you are able to display the ads to the users who click the button you need.
5. Goods and filters sorting
Tumblr media
Try different types of sorting for different types of visitors. See if the conversion increases the sorting by popularity for new visitors and by new arrivals for regular customers.
Try to sort by ascending prices for visitors referenced from the adds where you mentioned "low prices".
It also makes sense to test and filter. Make all filters minimized by default. Try to detail only the most important ones, the rest should be closed. Change the order of output filters, display only the most important ones at the top.
6. Registration form
Tumblr media
You know perfectly well that few people like to go through the registration process, often users don’t want to enter any data, they are afraid of long forms that need to be filled out. Try to reduce the number of fields, or make a multi-step registration.
Test the layout of this form, perhaps you are too aggressively trying to collect the leads. If the registration form is the first thing that the user sees on the site, then this may scare him. But placing the form after the feedback and the list of benefits is a more rational option for the client, as it will increase the conversion rate.
No one likes spam. Try adding a few words that you will not fill up the emails of your users with useless information. You can say that you will not send them letters more than 1-2 times a week. Please note that this kind of message must be convincing.
Try increasing individual form fields. Large fields subconsciously seem friendlier than others.
Add a description to each field. Perhaps the visitors do not fill out the form completely, because they simply do not understand what exactly to write there and how to do it correctly.
You can simplify the process of filling out a form due to the automatic filling of the fields. For example, you can automatically track a person’s geographic location, time zone, national currency, etc. Therefore you should not ask him to fill in all this information.
Try to place a button with the possibility of registering/entering your store through social networks. Check how the user finds it more convenient to go to your site.
7. The process of registration and payment for the order
Tumblr media
Uncertainty scares - the user needs to feel that he is in control of the process. Create a visually visible and clear progress indicator during checkout. A progress bar will help users see how much is left before the process is complete.
At the same time, it is worth testing the payment page i.e. the convenience of the fields, the possible arrangement and order of the elements. What for? Faster checkout contributes to less loss of users at every step, the main thing is that there is enough information necessary for the purchase and various methods of payment and delivery.
A growing number of customers are concerned about the theft of credit card information. Test your payment expansion and check its effect on the conversion.
Add security icons to the form of payment for goods right next to the "Confirm" button. As practice shows, many people find such elements of large importance. It also increases the credibility of potential customers.
Conclusions
Before landing page A/B testing, there is still a long process of analyzing and working with your customer, on the basis of which hypotheses are worked out and they grow into successful solutions.
A/B testing is carried out in order to understand the needs of your users and to make your website more attractive and more convenient for them. With the help of testing, you will increase the achievement of target actions, increase conversion and get more profit.
And if you need help or advice of an expert in this matter, please contact our MakeBeCool company. We will be pleased to help you find the right solution.
0 notes