Swizec Teller - a geek with a hatswizec.com

    Livecoding #27: New React Indie Bundle page almost done

    This is a Livecoding Recap – an almost-weekly post about interesting things discovered while livecoding ?. Always under 500 words and with pictures. You can follow my channel here. New streams almost every Sunday at 2pm PDT. There’s live chat, come say hai ?

    Continuing from last week, we kept putting together the new page for the React Indie Bundle. I wanted to get it done this weekend, but then I didn't.

    Launching the first version tomorrow is getting tight ?

    To be honest, nothing crazy technical happened in this livecoding session. Slapping together content in React components followed by more slapping together of content.

    It's really a somewhat repetitive process. Maybe there's a market for building React-ready templates? Just like most templates you buy now are built with Bootstrap so they're easy to customize, it would be cool if in the future we could get some that are built with React.

    Then instead of getting a bunch of HTML like this:

    <div class="box-hex flat-shadow box-huge">
    <div class="box-dummy"></div>
    <figure class="box-inner">
    <img class="svg-inject" src="image_src" alt="alt_text">
    </figure>
    <figcaption class="box-caption">
    <h4>Says</h4>
    I like ancient stuff
    </figcaption>
    <div class="hex-right"></div><div class="hex-left"></div></div>
    <h3 class="text-center">
    <a href="some">
    John Langan
    </a>
    <small class="block">Art Director</small>
    </h3>
    <p class="text-center">some text</p>
    <ul class="list-inline text-center social-icons social-simple">
    <li>
    <a href="some" target="_self">
    <i class="fa fa-facebook"></i>
    </a>
    </li>
    <li>
    <a href="some" target="_self">
    <i class="fa fa-twitter"></i>
    </a>
    </li>
    </ul>

    Which you have to manually retype, or copypasta, into an Author component like this:

    export const Author = ({ src, name, title, description, links }) => (
    <div>
    <div class="box-hex flat-shadow box-huge">
    <div class="box-dummy">
    <figure class="box-inner">
    <img class="svg-inject" src={src} alt={name} style="{{height:" "217px"}}="">
    </figure>
    </div>
    <h3 class="text-center">
    {name}
    <small class="block">{title}</small>
    </h3>
    <p class="text-center">{description}</p>
    <ul class="list-inline text-center social-icons social-simple">
    {Object.keys(links).map((type, i) => (
    <li key={i}>
    <a href={links[type]} target="_self">
    <i class="{`fa" fa-${type}`}="">
    </i></a><i class="{`fa" fa-${type}`}="">
    </i></li><i class="{`fa" fa-${type}`}="">
    ))}
    </i></ul><i class="{`fa" fa-${type}`}="">
    </i></div><i class="{`fa" fa-${type}`}="">
    );
    </i></div>

    _The template would give you <Person /> by default. Is React still too hard for designers to grok? I know many of them understand HTML ?Then again, if you look at that, you'll see that the conversion looks a bit like this:- class becomes className

    • content becomes {something}
    • repetitive content becomes thing.map(<loop stuff>)Almost sounds like you could automate that. Or is it juuuuuust tricky enough that you need a junior developer of some sort?Definitely a junior developer job, if you have access to one of those. Otherwise ,you gotta schlep through it yourself.But as my CTO would say, if a landing page can mean the difference between $0 and $60,000 in revenue, why wouldn't you build it yourself?_

    Did you enjoy this article?

    Published on November 21st, 2016 in Front End, Livecoding, react, Technical,

    Learned something new?
    Read more Software Engineering Lessons from Production

    I write articles with real insight into the career and skills of a modern software engineer. "Raw and honest from the heart!" as one reader described them. Fueled by lessons learned over 20 years of building production code for side-projects, small businesses, and hyper growth startups. Both successful and not.

    Subscribe below πŸ‘‡

    Software Engineering Lessons from Production

    Join Swizec's Newsletter and get insightful emails πŸ’Œ on mindsets, tactics, and technical skills for your career. Real lessons from building production software. No bullshit.

    "Man, love your simple writing! Yours is the only newsletter I open and only blog that I give a fuck to read & scroll till the end. And wow always take away lessons with me. Inspiring! And very relatable. πŸ‘Œ"

    ~ Ashish Kumar

    Join 15,883+ engineers learning lessons from my "raw and honest from the heart" emails.

    ⭐️⭐️⭐️⭐️✨
    4.5 stars average rating

    Have a burning question that you think I can answer? Hit me up on twitter and I'll do my best.

    Who am I and who do I help? I'm Swizec Teller and I turn coders into engineers with "Raw and honest from the heart!" writing. No bullshit. Real insights into the career and skills of a modern software engineer.

    Want to become a true senior engineer? Take ownership, have autonomy, and be a force multiplier on your team. The Senior Engineer Mindset ebook can help πŸ‘‰ swizec.com/senior-mindset. These are the shifts in mindset that unlocked my career.

    Curious about Serverless and the modern backend? Check out Serverless Handbook, for frontend engineers πŸ‘‰ ServerlessHandbook.dev

    Want to Stop copy pasting D3 examples and create data visualizations of your own? Learn how to build scalable dataviz React components your whole team can understand with React for Data Visualization

    Want to get my best emails on JavaScript, React, Serverless, Fullstack Web, or Indie Hacking? Check out swizec.com/collections

    Want to brush up on modern JavaScript syntax? Check out my interactive cheatsheet: es6cheatsheet.com

    Did someone amazing share this letter with you? Wonderful! You can sign up for my weekly letters for software engineers on their path to greatness, here: swizec.com/blog

    Want to brush up on your modern JavaScript syntax? Check out my interactive cheatsheet: es6cheatsheet.com

    By the way, just in case no one has told you it yet today: I love and appreciate you for who you are ❀️

    Created by Swizec with ❀️