Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Livecoding: Building a Real Life Color Picker [Video]

DZone's Guide to

Livecoding: Building a Real Life Color Picker [Video]

Tag along as this creator makes a real life color picker mobile app with React Native, walking you through his process and coding.

· Mobile Zone
Free Resource

Discover how to focus on operators for Reactive Programming and how they are essential to react to data in your application.  Brought to you in partnership with Wakanda


This weekend we set out to build a color picker for real life. Grab your phone, point it at a thing, find that thing’s RGB color.

Not sure why, but it’s a fun little way to play with React Native and device cameras. We found a package called react-native-camera that makes camera integration easy.

Import the project, and use it to render a live view of the camera in your app. That was easier than I thought it would be. Guess that’s the benefit of being late to the game: others have already built the things that are hard. Now you just have to put them together like LEGO pieces in novel ways.

That’s the main benefit of React Native, isn’t it? Components that do stuff and fit together. Just write a little glue code, and everything fits.

My favorite discovery was Quicktime’s movie recording mode. You can show your phone screen on your main screen.

No more this:

Image title

This:

Image title

Isn’t that better? I think it is. It’s going to improve future my livecoding sessions and React Native School videos.

Hm, this isn’t a very long livecoding recap. Could we really have done so little? Was I that wasted from running a lot on Sunday morning?

I mean, we found three JavaScript image manipulation libraries that are going to help us find color codes, but we didn’t get to use them before our time was up.

And we discovered that even if you’re saving photos temporarily, you still need Photo Library permissions. Forget to ask, and your app will crash. That part was confusing.

But that’s basically it, darn. Next time I should drink more caffeine.

Here is next day’s follow-up session. That was fun too, we learned that my computer is crazy slow.


Learn how divergent branches can appear in your repository and how to better understand why they are called “branches".  Brought to you in partnership with Wakanda

Topics:
nativescript ,react ,mobile ,mobile apps ,app development

Published at DZone with permission of Swizec Teller, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}