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">
    <figcaption class="box-caption">
    I like ancient stuff
    <div class="hex-right"></div><div class="hex-left"></div></div>
    <h3 class="text-center">
    <a href="some">
    John Langan
    <small class="block">Art Director</small>
    <p class="text-center">some text</p>
    <ul class="list-inline text-center social-icons social-simple">
    <a href="some" target="_self">
    <i class="fa fa-facebook"></i>
    <a href="some" target="_self">
    <i class="fa fa-twitter"></i>

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

    export const Author = ({ src, name, title, description, links }) => (
    <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"}}="">
    <h3 class="text-center">
    <small class="block">{title}</small>
    <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}`}="">

    _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?
    Want to become an expert?

    Here's how it works 👇

    Leave your email and I'll send you thoughtfully written emails every week about React, JavaScript, and your career. Lessons learned over 20 years in the industry working with companies ranging from tiny startups to Fortune5 behemoths.

    Join Swizec's Newsletter

    And get thoughtful letters 💌 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 over 14,000 engineers just like you already improving their careers with my letters, workshops, courses, and talks. ✌️

    Have a burning question that you think I can answer? I don't have all of the answers, but I have some! Hit me up on twitter or book a 30min ama for in-depth help.

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

    Curious about Serverless and the modern backend? Check out Serverless Handbook, modern backend for the frontend engineer.

    Ready to learn how it all fits together and build a modern webapp from scratch? Learn how to launch a webapp and make your first 💰 on the side with ServerlessReact.Dev

    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 ❤️