👍🎉 First off, thanks for taking the time to contribute! 🎉👍
I initially created the library because I wanted to create a rich experience for the startup app I'm building, Springsale. As react-native-blurhash gained more and more stargazers, I added more and more features to this library such as encoding support, asynchronous decoding, load status callbacks, windows support and more.
- The native iOS part is written in Swift and bridged to Objective-C (for the React-Native macros). If you're not familiar with this setup, either read into the code, or check out the resources I used.
- The blurhash encoder and decoder is copied from woltapp/blurhash/Swift as per commit 95d05e2 and uses this PR to cache Cosine operations
- The native Android part is written in Kotlin. If you're not familiar with this setup, read some Kotlin syntax and you'll get the hang of it.
- The blurhash decoder is copied from woltapp/blurhash/Kotlin as per commit 539cf8a
- The blurhash encoder is copied from this PR
- The JS part is written in JS, and types are manually created using an
index.d.ts
file. - Currently the
BlurhashView
type inherits fromUIView
(iOS) andAppCompatImageView
(Android). That means, they are different types, and none of those inherits fromRCTImageView
/ReactImage
. (Mostly because on Android thesetDrawable(...)
fucntion is deprecated when inheriting fromReactImage
since it usessource
for setting the Image source)
- For Swift, use SwiftFormat
- For Kotlin, use Android Studio
- For JS, use ESLint and Prettier (already configured in the Project)
Create pull requests if:
- You added some stuff that enhances the library
- You added some stuff that fixes a bug in the library
- You changed some stuff so the library is more efficient (is faster)
Create issues if:
- Something doesn't work as expected
- You have a question (use the Question issue template)
- You want to propose changes or enhancements to the library
Always stay civil in discussions. Otherwise I'll find you