react-native-skia icon indicating copy to clipboard operation
react-native-skia copied to clipboard

Linking documentation to Examples/ source code?

Open xcoderreal opened this issue 2 years ago • 3 comments

Description

TL;DR: I found Examples/ source code to be quite helpful.

As an example: recently I'm exploring how to implement multi-touch handlers for my Skia app, and naturally I consult the documentation and learn that I could use useMultiTouchHandler().

However, it turns out the examples in the documentation doesn't fully utilize the API (onStart, onActive, onEnd). After some searches on GitHub, I found the Touch.tsx in the "API" example to be quite useful; especially I can build and play around with it locally.

How do you feel if the documentation could somehow link / directly enclose the example apps?

(Maybe documentation is by design to not overwhelm people? Or maybe it's not a priority for now?)

xcoderreal avatar Aug 31 '22 06:08 xcoderreal

Hi @xcoderreal! Thanks for the suggestion - the documentation is type checked against the current version of the library, but not linked to the Examples source (as you say because we'd like it to be simple) - so this is a good suggestion. If you want you can create a PR with links for the TouchHandler as you suggested - it makes sense I think for more deep dives into the functionality. What do you think @wcandillon ?

chrfalch avatar Aug 31 '22 11:08 chrfalch

Hi @chrfalch, sounds good! Lemme know if the PR looks good :)

xcoderreal avatar Sep 02 '22 05:09 xcoderreal

Can you open a PR for that commit?

wcandillon avatar Sep 12 '22 08:09 wcandillon