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.
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.
Polls
A progress bar that can be incremented and decremented by user input. Uses useState to manage the state
of the 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.
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.
Apps
See more apps here.
Live Scores
Live like score board for Soccer games.
FeedMe
A collaborative multi-player game.
Pixelary
Enter Pixelary, the MMO drawing game where creativity meets competition. The top player of the week is the reigning champion.
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:
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: