Swizec Teller - a geek with a hatswizec.com

    Livecoding #35 - A New Site for reactd3js.com

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

    <This is where a video of the livecoding would go, but LiveEdu saved only the first 5 minutes. The rest went poof ?>

    I guess I could upload my own copy to Youtube and embed that… ?

    Anyway… today, we built this: reactd3js.com – a new site for all things React & D3v4. After two years of working on React+D3js the book, it dawned on me that “Hey, maybe I should buy the domain!”

    Nobody else thought to get it either :D


    The new site isn't much to look at, and it doesn't have to be. It exists, and that's what matters because now I can make stickers! Right now, the site is a link to the book and to the next workshop.

    Ok, I'll be honest: 90% of that screenshot happened many hours after livecoding was over. Writing with people watching over my shoulder still feels weird.

    So what did we learn while livecoding this?

    We learned that Canon didn't think their flip screen UX through. The cable between the camera and the computer covers the screen you use to see yourself. Maybe they never intended you to use your DSLR as a webcam? Who knows ...


    We also learned that @daemon92 misses Kiwi butt. With the new camera, my bird no longer puts his butt in front of the camera. Such loss.

    And Daemon is still doing homework. He hopes to finish soon, so he can go spring break and party. Young'uns these days… when I was in college, we partied first and studied second.

    We also learned that setting up a custom domain for Github pages is still confusing. Documentation feels circular, fragmented into too many pages that say two sentences, then tell you to go somewhere else for the real answer. It's ridiculous.

    At least they create the CNAME file for you these days. I think that's how Github servers know which repository a domain links to.

    I mean, you're setting DNS to point at Github servers in general. They must be doing some sort of resolving internally.

    It's been a while since I sysadmined ?

    Oh, and fundamentally, we learned that using a custom domain when hosting your site on Github pages disables https. No green checkmark for your beautiful new page.

    This makes sense of course. They'd have to issue certificates for each domain hosted on their servers, and that kind of defats the purpose.

    Oh, and we learned that to get Webpack offline-plugin to work, you have to npm run eject your app. This is unfortunate because you lose automatic react-scripts updates, but worth it because it makes your site hella fast. Hella. ?

    Until next time, happy hacking. ?

    PS: I later learned that running offline-plugin on localhost is a bad idea


    Did you enjoy this article?

    Published on March 13th, 2017 in Livecoding, 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 ❤️