processing / processing/p5.js

Add React compatible example to p5() instance method

Open
#6,213 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:Core Enhancement
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Increasing Access

Unsure
Although it may not have an immediate impact on increasing access to people listed in the documentation, it will help anyone trying to use p5js in a React application.

Most appropriate sub-area of p5.js?
  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build Process
  • Unit Testing
  • Internalization
  • Friendly Errors
  • Other (specify if possible)
Feature enhancement details

I want to provide two examples of using the p5() instance method to render sketches in a React project. The first will utilize the existing example in a React project context. The second will be more advanced: I will provide an example of how to expose the parameters of a p5 sketch to the client using a closure.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing p5() instance-method example and the documentation context; no file or test is named in the issue. Add two React examples: one adapting the existing example and one showing closure-based parameter exposure, then confirm both examples are understandable and render as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation, frontend
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.