Open da5idf opened 1 year ago
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
I'm hesitant to include such a specific example for a few reasons.
First is that React is not something we semantically support (it may work but we don't guarantee it will always work) and p5.js usually work better as a script included in the page instead of being imported into a component (which is what I see many people using React prefer to do).
Second is that if we included examples for React, there should be a case to be made for other frameworks as well. We need a criteria to determine whether to include something or not, and it can be hard to remove an example later so this criteria needs to be strict.
Third, I'm unsure how this increases access and I'm not sure endorsing React only is something we want to do as well.
Hey there, Thanks very much for your quick response! This all makes a lot of sense. Perhaps a Medium article or something outside the official documentation makes more sense for this type of example. Thanks for your feedback.
Cheers, David
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?
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.