paint-brush
QuickStart a React Native Cross-Platform Blog using a CMS APIby@carsoncgibbons
1,358 reads
1,358 reads

QuickStart a React Native Cross-Platform Blog using a CMS API

by Carson GibbonsAugust 14th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In this blog we’ll quickstart a <a href="https://cosmicjs.com/apps/cross-platform-blog" target="_blank">React Native Cross-Platform Blog</a> using the <a href="https://github.com/cosmicjs/cosmic-cli" target="_blank">Cosmic JS CLI</a>. This app is three apps in one: Web, iOS and Android app all with content powered by <a href="https://cosmicjs.com" target="_blank">Cosmic JS</a>. Go to the <a href="https://github.com/cosmicjs/cross-platform-blog" target="_blank">GitHub repo</a> to see the iOS and Android app share the same React Native codebase which cuts dev time in half. The web version runs on a light Node.js server, all with content served from the <a href="https://cosmicjs.com/" target="_blank">Cosmic JS CMS API</a>. Create your content once, deliver everywhere.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - QuickStart a React Native Cross-Platform Blog using a CMS API
Carson Gibbons HackerNoon profile picture

In this blog we’ll quickstart a React Native Cross-Platform Blog using the Cosmic JS CLI. This app is three apps in one: Web, iOS and Android app all with content powered by Cosmic JS. Go to the GitHub repo to see the iOS and Android app share the same React Native codebase which cuts dev time in half. The web version runs on a light Node.js server, all with content served from the Cosmic JS CMS API. Create your content once, deliver everywhere.

TL;DR:




React Native Cross-Platform Blog PageReact Native Cross-Platform Blog DemoReact Native Cross-Platform Blog CodebaseReact Native Knowledge Base

React Native Cross-Platform Blog Features:

  1. Native iOS and Android apps share the same React Native codebase. Learn once, write anywhereTM.
  2. Web is fully responsive down to mobile w/ Bootstrap frontend.
  3. Images are easily manipulated for different device / browser requirements via the Cosmic JS provided Imgix integration.

Cosmic JS is an API-first content management platform that makes it easy to add content to any existing or new application. Developers get a suite of powerful APIs while content managers manage content in a familiar cloud-based content editor.

QuickStart a React Native Cross-Platform Blog using a CMS API

Cosmic JS is an example of a robust headless CMS and API that’s promoting collaboration on cross-functional teams to build apps faster. Get started building Cosmic-powered apps in seconds 🚀 We have Node.js, React, Vue, Gatsby and Serverless Starters to help you get your project started quickly. There are over 70 app examples available in the Cosmic JS Apps Marketplace to speed up your project as well. Today we’ll be using the Cosmic JS CLI to quickstart a React Native Cross-Platform Blog.

🛠️ Installation

Install via the Cosmic CLI:

I set up an example Bucket for this blog:

Run cosmic -h for a list of all commands. Run cosmic [command] -h for details on options for a specific command. You're now up and running with a React Native Cross-Platform Blog that can be managed entirely from your Cosmic JS Bucket Dashboard and Command Line Terminal tool of choice.

Conclusion

I was able to easily install a React Native Cross-Platform Blog using a headless CMS API that I can now use to manage dynamic content changes. When ditching the installed content management system and going API-first isn’t quick enough, check out the Starter Apps from Cosmic JS to get a project up and running in seconds. 🔥

If you have any comments or questions about building React Native apps with Cosmic JS, reach out to us on Twitter and join the conversation on Slack.