~/talk

Code techniques for handling dynamic data in the new(ish) world of blocks

Talkat WordCamp Europe 2023 · 2023-06-08..06-10· [wordpress, javascript]
links:none on file
slides:none on file

Walks through a working Parthenon plugin scaffolded with create-block, uses a PHP render callback to inject block HTML and JSON-encoded attributes, enqueues build/front-end.js via wp_enqueue_script and webpack, then mounts front-end React components (wp.element, WP Components) into a target div. Demonstrates passing attributes into JSX, and fetching live data from a custom REST route (fake calendar slots) with fetch/async — the demo renders the date picker, retrieves slots, and logs the response, so the approach actually works.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 4:03Dynamic data in blocks
  3. 8:46Plugin structure and registration
  4. 13:11Creating and using the block
  5. 17:49Running JavaScript on frontend
  6. 27:20Rendering React components
  7. 36:21Passing attributes to JavaScript
  8. 37:48Interactive API preview
  9. 48:23Fetching data via REST API
  10. 52:23Demo and conclusion
~/search
type to search 6,518 conferences, 143,918 speakers and 192,133 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.