|

WordCamp US 2019 – Just Enough React for WordPress – Shannon Smith

New Block Editor

Discover the Possibilities

  • Block templates
  • Blocks instead of custom fields, shortcodes, etc

How Does the New Block Editor Work?

  • Uses React, JavaScript/JSX
  • Blocks are like plugins
  • There is a Core Layer & Editorial Layer
  • React abstraction is built-in

Cool Stuff

  • Blocks can be reusable
  • Backend Workflow-only blocks
  • Block level locking – you can remove blocks that are not needed.

React

  • Uses JSON literals
  • It’s in the HTML but doesn’t negatively affect the HTML

Templates

  • You can create block templates
  • Can be assigned to existing post types
  • You can have nested templates

Compatibility

Shortcodes

  • Will continue to work as before but contained within a block

Custom Post Types

Metaboxes

  • Can be converted to blocks
  • Can be used in the block editor

Themes

  • You can control things like color(theme color palette and styles in the block editor to ensure that users follow branding/design styles.

Block Styles

  • Blocks can be style to match the site theme.

Block Creation

  • A lot of flexibility
  • You can scaffold out them with the WP-CLI

How to Win at Go

You need to break some things before you can finally have something that is working.

Tips & Tricks

  • Reusable Blocks – You can turn any block into a reusable block, update once and reflected everywhere
  • Block Directory – this is starting and you can get involved in providing direction.
    • You’ll be able to add block apart from themes/plugins so you can design around just the blocks you need

Q&A

  • Blocks are really a backend piece, the front end doesn’t use the React blocks.
  • Can React be used in the frontend? Today it’s only a backend content editing feature.

Similar Posts

  • /

    WordCamp US 2019 – Securing WordPress in the age of 0-Day Vulnerabilities – Rahul Nagare

    scaledynamix.com/WCUS 0-Day Vulnerabilities Recently discovered No current fix Already being attacked Reference – wpvulndb.com Why My Site? They want to send your traffic somewhere else to boost SEO rank They want to use your site as a “bot” to attack a targeted site. How Do You Protect Your Site? Protection Against Redirects Hardcode your site/home URL Protect your wp-config.php Protect Against Automated Plugin Updates Limit access to wp-admin, white-list admin IPs Protect Against Code Injections Block all POST requests without a valid referrer Set Content-Security-Policy header You still need to follow the standard security best practices
  • / / / /

    Looking Back on 2017, the Year of Firsts

    I don’t recall if I’ve ever written any sort of year-in-review blog post or even social media post, but this year I have had so many firsts that I wanted to reflect on and share my thanks for. Health In the health department I not only reached my initial target goal weight but actually surpassed it, and my second target. I think this year I’ve weighed the least that I have in 26 years. I have always struggled with my weight and living a more healthy lifestyle. I attribute my success primarily to my wife, and also to the encouragement of many friends and family. I also had to have a lot of self-determination as well, but that was only had by seeing the impact my…
  • / /

    Highlights of WordCamp Grand Rapids 2018

    TL;DR – This year #WCGR was all about people and conversations for me. Oh, and trying my hand at speaking, which I didn’t totally bomb. Today marked the 4th WordCamp Grand Rapids that I’ve attended. Last year I was just an attendee but this year I stepped things up in a pretty bug way. I was not only a volunteer at the Happiness Bar, but I helped with organize the event, and was even one of the speakers. One of the things I love about #WordCamp Grand Rapids, and the #WordPress community is the people. Yet again I felt welcomed as a member of the community, valued for my experiences as a developer and user of WordPress, and encouraged when I had doubts of being…
  • /

    WordCamp US 2019 – Thinking Remotely Through Games – Tammie Lister

    Benefits Dissolve – thought barriers Opens – creativity Types of Play Unoccupied Play – free to think on your own Independant or solitary play Onlooker play – watching others Parrallel play – same time but separate Associative play Team Context Parallel play – same task, in isolation Associative Play – co-op working Co-op Play – together as a team Game Types Constant Unoccupied play – lab-time each week Associative play – hack days Events Parrellel Play – 6up (what if what could be) / elevator pitch Co-op Play – Team shield Merged play – Retrospective Retrospective Rose / bud / thorn Fire / forge / treasure Warm Ups – opens up everyone to collaborate Sketch Photo Tips Be flexible – adapt as play Always summarize…
  • /

    WordCamp GR 2019 – Confidently Testing WordPress – Steve Grunwell

    https://stevegrunwell.github.io/confidently-testing-wordpress/#/ Testing Fundamentals Automated Testing Reduces time + chance of human error Easily reproducible Gateway to CI/CD Test Types Unit – Test the smallest possible unit of an app. Often a single function Integration – How individual components interact End-to-End(E2E) – An entire path through an application Automated Testing Pyramid ROI for Testing System Under Test (SUT) The system we’re currently testing: A single method A class A whole feature WordPress Testing is Complicated Tightly-coupled system Difficult to test anything in true isolation Testing Toolbox PhpUnit – https://phpunit.de/ Structure Test Suite – Collection of test classes Test Class (class) – Collection of test methods Test Case (method) – A single scenario to be tested Assertions True or False Equality Verify Contents – contains, regular expression…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)