Giter Club home page Giter Club logo

react-native-custom-components's Introduction

React Native Legacy Custom Components

This is a module for legacy "CustomComponents" to gracefully deprecate.

Navigator

The navigator component in this module will behave identically as the one in old version of React native, with one exception:

Latest documentation is available here: https://facebook.github.io/react-native/docs/0.43/navigator.html

Breaking Changes from react-native

  • Navigator.props.sceneStyle must be a plain object, not a stylesheet!

(this breaking change is needed to avoid calling React Native's private APIs)

react-native-custom-components's People

Contributors

chrishughes avatar ericvicenti avatar hramos avatar rghorbani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-custom-components's Issues

Element type is inalid: expected string but got: object

I have upgraded react-native to 0.44 and I have seen that Navigator is deprecated.

I have already install and import from 'react-native-deprecated-custom-components' but I get this error:

Element type is inalid: expected a string (for build-in components) but got: object.

Check the render method of 'TestApp'.

This is the code:

import React, {Component} from "react";
import {AppRegistry, StatusBar, StyleSheet, View} from "react-native";

import Navigator from "react-native-deprecated-custom-components";

import Root from "./root";

export default class TestApp extends Component {

  renderScene(route, navigator) {
    console.log(route);

    if (route.name === 'root') {
      return <Root navigator={navigator} />
    }
  }

  render() {
    return (
      <View style={styles.container}>
        <StatusBar animated/>
        <Navigator
          initialRoute={{name: 'root'}}
          renderScene={this.renderScene.bind(this)}
        />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#eeeeee',
  },
});

AppRegistry.registerComponent('TestApp', () => TestApp);

I tried to remove all except <Navigator /> but is still getting the error. If I remove <Navigator /> I don't get the error.

Add UWP support

react-native-windows has an extension of this framework which can't be used as
Navigator is not available through @providers anymore.

Please add support of UWP to keep compatibility.

React Lifecycle functions are not called in their respective order

I'm running into a weird issue where componentWillUnmount and render react-lifecycle function will get called before componentWillMount and cause a lot of undefined errors. Interestingly enough this only happens on release mode for iOS.

TypeError: undefined is not an object (evaluating 'this._subscribableSubscriptions.forEach')

This error is located at:
    in Navigator
    in RCTView
    in t
    in Connect(t)
    in t
    in n
    in t
    in RCTView
    in RCTView
    in t

Suddenly started happening, I'm not quite sure why.

react-native: 0.51.0
react-native-custom-components: latest-commit (not published yet)

Licensing Issue

Shouldn't it be licensed under BSD license as the ReactNative framework?

_clearTransformations does check if the sceneRef is null

When popping to route, _clearTransformations sets some props on a scene but unlike other places it does not perform a null check, causing the following error:

Fatal Exception: com.github.aoriani.rnstacktracer.ReactNativeException: null is not an object (evaluating 'this._sceneRefs[t].setNativeProps')
       at ._clearTransformations._clearTransformations(1621:7328)
       at .popN.popN(1621:14274)
       at .popToRoute.popToRoute(1621:15312)

Malformed calls from JS: field sizes are different / Error calling JSTimers.CallTimers [Fixed]

I have several similar Apps still with this pioneer Navigation, so now that Google requires a 64 bit version that is only available on RN 0.59, I had to upgrade. There are too many implications and limitations in changing now to another navigation system.

In this version of RN, when I navigated to another route, I was having this error Malformed calls from JS: field sizes are different.and in another experiment Error calling JSTimers.CallTimers.
I found out that if I removed the RightButton from NavigationBarRouteMapper all was ok so after some research, I fixed this error by commenting/removing this bit of code from src/NavigatorNavigationBarStylesIOS.js:

left: {
  type: 'linear',
  from: startStyles.RightButton.left,
  to: endStyles.RightButton.left,
  min: 0,
  max: 1,
  extrapolate: true,
},

I just leave this fix here so anyone with the same problem can have this possible solution.

npm install is not working

Error

 Could not install from "github.com:facebookarchive/react-native-custom-components.git" as it does not contain a package.json file.

Update with more error

fetchPackageMetaData error for git+ssh://[email protected]/facebookarchive/react-native-custom-components.git exited with error code: 1
8 verbose stack Error: exited with error code: 1

using npm 5

Problem When in use NavigationBar

Hi i have a problem when use this code.
<NavigationExperimental.Navigator ref='main' initialRoute={routes[0]} renderScene={this.renderScene.bind(this)} navigationBar={ <NavigationExperimental.Navigator.NavigationBar navigationStyles={NavigationExperimental.Navigator.NavigationBarStylesIOS} ...

I have a error is " Cannot read property 'NavigationBar' of undefined "

I think i use this repo in wrong way but now am not have any idea for fix it.

Thankyou

What happen with with Error?

This is my error:

error: bundling: SyntaxError: /Users/thiensubs/Documents/timwifichua-react-native/node_modules/react-native-custom-components/index.js: Unexpected token, expected { (1:7)
> 1 | export Button from './src/components/Button';
    |        ^
  2 | export ToggleButton from './src/components/ToggleButton';
  3 | export HtmlView from './src/components/HtmlView';
  4 | export InputEditor from './src/components/InputEditor';
    at Parser.pp$5.raise (/Users/thiensubs/Documents/timwifichua-react-native/node_modules/babylon/lib/index.js:4443:13)
    at Parser.pp.unexpected (/Users/thiensubs/Documents/timwifichua-react-native/node_modules/babylon/lib/index.js:1755:8)
    at Parser.pp.expect (/Users/thiensubs/Documents/timwifichua-react-native/node_modules/babylon/lib/index.js:1743:33)
    at Parser.pp$1.parseExportSpecifiers (/Users/thiensubs/Documents/timwifichua-react-native/node_modules/babylon/lib/index.js:2822:8)
    at Parser.pp$1.parseExport (/Users/thiensubs/Documents/timwifichua-react-native/node_modules/babylon/lib/index.js:2650:28)
    at Parser.parseExport (/Users/thiensubs/Documents/timwifichua-react-native/node_modules/babylon/lib/index.js:5873:20)
    at Parser.pp$1.parseStatement (/Users/thiensubs/Documents/timwifichua-react-native/node_modules/babylon/lib/index.js:1878:74)
    at Parser.parseStatement (/Users/thiensubs/Documents/timwifichua-react-native/node_modules/babylon/lib/index.js:5795:22)
    at Parser.pp$1.parseBlockBody (/Users/thiensubs/Documents/timwifichua-react-native/node_modules/babylon/lib/index.js:2262:21)
    at Parser.pp$1.parseTopLevel (/Users/thiensubs/Documents/timwifichua-react-native/node_modules/babylon/lib/index.js:1772:8)
Bundling `index.ios.js`  96.2% (406/414), failed.

Please help me?

PropTypes.oneOfType

Hi,

I get

undefined is not an object (evaluating '_react2.PropTypes.oneOfType')

any ideas how to solve that ?

unable to resolve module

Here i have installed components

dependecies:{
    "react": "^16.0.0-alpha.12",
    "react-native": "0.46.4",
    "react-native-deprecated-custom-components": "^0.1.1",
...
}

and packager shows me

error: bundling failed: "Unable to resolve module Navigator from /home/makswork/is74/lkapp_new/ReactApp/components/CityPayBackButton.js: Module does not exist in the module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: watchman watch-del-all.\n 2. Delete the node_modules folder: rm -rf node_modules && npm install.\n 3. Reset packager cache: rm -fr $TMPDIR/react-* or npm start -- --reset-cache."

I fix problems with PropTypes
Why does this happened?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.