Skip to content

React native support #150

Open
Open
@tonyxiao

Description

@tonyxiao

Logdown doesn't seem to work in react native by default. This is my workaround

import 'localstorage-polyfill'
import { defaults } from 'lodash'
// https://github.com/caiogondim/logdown.js
localStorage.debug = __DEV__ ? '*' : false
// TODO: Make logdown recognize react-native properly
/**
 * Get color working in logdown
 * https://github.com/caiogondim/logdown.js/blob/master/src/util/is-color-supported/browser.js
 */
defaults(window, {
  document: {
    documentElement: {
      style: {
        WebkitAppearance: '',
      },
    },
  },
})

Would be great if it's officially supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions