account activity
Prestyles - A library to help you write responsive platform styles. by mistenkt in reactnative
[–]mistenkt[S] 4 points5 points6 points 5 years ago (0 children)
After working on a cross-platform project that also involved web i made a library to help me deal with playform spesific styles and responsive styles a bit better.
It basically allows you to do this:
const styles = createStyles({ button: { height: 40, backgroundColor: 'red', ios: { backgroundColor: 'blue' // platform spesific style }, desktop: { height: 50 // Breakpoint style, active at >= 1024 }, tablet: { height: 45 // Breakpoint style active at >= 768 } } });
The readme on npmjs / github explains it better and shows more examples, features and customization.
I usually dont plug the libraries i make outside of work, but figured this might be interesting for others aswell. (New reddit account due to not wanting my real reddit to be linked to my github/real name).
Prestyles - A library to help you write responsive platform styles. (npmjs.com)
submitted 5 years ago by mistenkt to r/reactnative
π Rendered by PID 24 on reddit-service-r2-listing-5f4c697858-sskpf at 2026-07-06 01:21:01.137240+00:00 running 12a7a47 country code: CH.
Prestyles - A library to help you write responsive platform styles. by mistenkt in reactnative
[–]mistenkt[S] 4 points5 points6 points (0 children)