Skip to main content
Version: 0.10

Examples

Playpens

Playpens contain sharable snippets of code written in our Playground, a lightweight online development environment for rapid exploration with Blocks.

Click any of the examples below to start experimenting.

See more playgrounds here.

Drawable canvas

Drawable Canvas

This playpen uses useState to manage the state of the canvas. It allows the user to draw on the canvas by tapping on an interactive grid of squares. The square's onPress handler is used to update the state of the canvas.

Open in Play

Polls

Polls

A progress bar that can be incremented and decremented by user input. Uses useState to manage the state of the progress bar.

Open in Play

Progress bar

Progress bar

A progress bar that can be incremented and decremented by user input. Uses useState to manage the state of the progress bar.

Open in Play

In-app navigation

In-App Navigation

A pattern for in-app navigation using a switch statement to render different components based on the current state. The current page is tracked with useState.

Open in Play

Apps

See more apps here.

Live Scores

Live Scores (Soccer)

Live like score board for Soccer games.

Demo

View source code

FeedMe

Feed Me

A collaborative multi-player game.

Demo

Pixelary

Pixelary

Enter Pixelary, the MMO drawing game where creativity meets competition. The top player of the week is the reigning champion.

Demo

View source code

Tutorials

See more tutorials here.

Remind me

Learn how to implement a Remind Me Later feature on Reddit using scheduler and the Reddit API client. The tutorial covers creating scheduled jobs, displaying custom input forms, and leveraging the chrono-node library to interpret user-inputted timeframes like "in two weeks." Users can set reminders from the overflow menu of a post, and the Remind Me app automatically sends private messages containing post links at the scheduled times, enhancing user engagement.

Capabilities used:

View tutorial

Three strikes

In this tutorial, you'll learn to implement a powerful moderation tool using Redis and the Reddit API, creating a "Three Strikes" system to manage rule violations within a community. The tutorial guides you through setting up the app, adding menu actions, and creating mod functionalities. The "Three Strikes" system imposes escalating penalties: a warning message for the first strike, a one-day community ban for the second, and a one-year ban for the third. The tutorial covers creating keys for authors using Redis, fetching posts and comments, checking and removing strikes, and even banning users when necessary. With step-by-step instructions and code snippets, you'll build a robust moderation tool that enhances community management on Reddit.

Capabilities used:

View tutorial