smartive
Published in

smartive

How We’re Sharing Code Between React and React Native

Part of our team following Vitaly Friedman’s Frontend Conf 2017 talk. Photo by Claudio Schwarz

Actions and Reducers

Annotated Flux Overview by Facebook: facebook.github.io/flux/docs/in-depth-overview.html
import { reducers } from ‘your-shared-package’;const store = createStore(combineReducers({
...reducers,
yourCustomReducer: /* (state, action) => state */
}));

Business Layer

Components and Styles

Styled Components

Higher Order Components

Writing a Library

TL;DR

  • Actions, Action Creators and Reducers
  • Business Layer
  • styled-components Theme Configs
  • Higher Order Components

--

--

When we write, we usually write code. Here, for once, we write about everything behind it — about our company culture and how we organise ourselves, which approaches and technologies are currently high on our agenda and how we master personal and technical challenges.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Robert Vogt

He tried to look ashamed and succeeded simply in looking pleased with himself. — Neil Gaiman