rdc-app-context

1.17.18 • Public • Published

RDC Context Provider

Shell context wrapper and component/helper library to be used across apps in realtor.com

Development

$ yarn
installs dependencies
$ yarn start
starts app

Currently, because of current CORS implementation, HOSTS file needs to be configured to use dev.realtor.com:1234 instead of localhost:1234

Install

yarn add rdc-app-shell

This module targets Node.js 6 or later and the latest version of Chrome, Firefox, and Safari.

If you you're developing using npm link, add the following alias in your webpack config, since Hooks can't have two instances of React running at the same time:

resolve: {
  alias: {
    react: resolve('./node_modules/react')
  }
}

RdcAppContext

The main Provider - Use it as a wrapper around your component to be able to access all contexts.

import React from 'react'
import { RdcAppContext } from 'rdc-app-context'

const Example = () => (
  <RdcAppContext>
    ... all components now have access to contexts
  </RdcAppContext>
)

Geo Context

Provides geo specific data such as current user location, both physical and interest.

Provides functionality in order to fetch and retrieve data from apis

Visit GeoContext - for full documentation

Feature Flag Context

Provides Feature Flag specific data: AB Tests and checking if features are enabled.

Provides functionality in order to fetch and retrieve data from apis.

Visit FeatureFlagContext - for full documentation

User Context

Provides user specific data such as, authentication information, profile, saved properties, saved searches and hidden home.

Provides functionality in order to fetch and retrieve data from apis.

Visit UserContext - for full documentation

Readme

Keywords

none

Package Sidebar

Install

npm i rdc-app-context

Weekly Downloads

0

Version

1.17.18

License

none

Unpacked Size

34.1 kB

Total Files

4

Last publish

Collaborators

  • otaviopadovani