Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we use <Jsontable> within reac components? Invariant Violation: View config not found for name tr #4

Open
franciscoamores opened this issue May 26, 2018 · 6 comments

Comments

@franciscoamores
Copy link

Invariant Violation: View config not found for name tr

This error is located at:
in tr (created by GridHeaderRow)
in GridHeaderRow (created by GridHeader)
in thead (created by GridHeader)
in GridHeader (created by JsonTable)
in table (created by JsonTable)
in div (created by JsonTable)
in div (created by JsonTable)
in JsonTable (at HomeScreen.js:78)
in RCTView (at View.js:60)
in View (at HomeScreen.js:69)
in RCTView (at View.js:60)
in View (at ScrollView.js:791)
in RCTScrollView (at ScrollView.js:887)
in ScrollView (at HomeScreen.js:57)
in RCTView (at View.js:60)
in View (at HomeScreen.js:56)
in HomeScreen (at SceneView.js:10)
in SceneView (at StackViewLayout.js:428)
in RCTView (at View.js:60)
in View (at StackViewLayout.js:427)
in RCTView (at View.js:60)
in View (at StackViewLayout.js:426)
in RCTView (at View.js:60)
in View (at createAnimatedComponent.js:154)
in AnimatedComponent (at StackViewCard.js:12)
in Card (at createPointerEventsContainer.js:28)
in Container (at StackViewLayout.js:488)
in RCTView (at View.js:60)
in View (at StackViewLayout.js:385)
in RCTView (at View.js:60)
in View (at StackViewLayout.js:384)
in StackViewLayout (at withOrientation.js:30)
in withOrientation (at StackView.js:58)
in RCTView (at View.js:60)
in View (at Transitioner.js:146)
in Transitioner (at StackView.js:22)
in StackView (at createNavigator.js:96)
in Navigator (at createKeyboardAwareNavigator.js:11)
in KeyboardAwareNavigator (at createNavigationContainer.js:372)
in NavigationContainer (at SceneView.js:10)
in SceneView (at createTabNavigator.js:10)
in RCTView (at View.js:60)
in View (at ResourceSavingScene.js:14)
in RCTView (at View.js:60)
in View (at ResourceSavingScene.js:10)
in ResourceSavingScene (at createBottomTabNavigator.js:79)
in RCTView (at View.js:60)
in View (at createBottomTabNavigator.js:70)
in RCTView (at View.js:60)
in View (at createBottomTabNavigator.js:69)
in TabNavigationView (at createTabNavigator.js:80)
in NavigationView (at createNavigator.js:96)
in Navigator (at createNavigationContainer.js:372)
in NavigationContainer (at SceneView.js:10)
in SceneView (at SwitchView.js:12)
in SwitchView (at createNavigator.js:96)
in Navigator (at createNavigationContainer.js:372)
in NavigationContainer (at RootNavigation.js:24)
in RootNavigation (at App.js:26)
in RCTView (at View.js:60)
in View (at App.js:24)
in App (at registerRootComponent.js:35)
in RootErrorBoundary (at registerRootComponent.js:34)
in ExpoRootComponent (at renderApplication.js:33)
in RCTView (at View.js:60)
in View (at AppContainer.js:102)
in RCTView (at View.js:60)
in View (at AppContainer.js:122)
in AppContainer (at renderApplication.js:32)
get$1
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:14126:6
createInstance
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:14295:27
completeWork
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:10097:14
completeUnitOfWork
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:12769:10
performUnitOfWork
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:12941:32
workLoop
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:12953:43
renderRoot
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:12996:17
performWorkOnRoot
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:13632:34
performWork
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:13545:26
performSyncWork
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:13506:16
requestWork
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:13392:6
scheduleWorkImpl
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:13259:24
scheduleWork
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:13207:28
enqueueSetState
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:6224:19
setState
C:\Users\FTorres\Kscope18Expo\node_modules\react\cjs\react.development.js:242:31
_handleFinishLoading
C:\Users\FTorres\Kscope18Expo\App.js:55:18
_callee$
C:\Users\FTorres\Kscope18Expo\node_modules\expo\src\launch\AppLoading.js:61:8
tryCatch
C:\Users\FTorres\Kscope18Expo\node_modules\regenerator-runtime\runtime.js:62:44
invoke
C:\Users\FTorres\Kscope18Expo\node_modules\regenerator-runtime\runtime.js:296:30

C:\Users\FTorres\Kscope18Expo\node_modules\regenerator-runtime\runtime.js:114:28
tryCatch
C:\Users\FTorres\Kscope18Expo\node_modules\regenerator-runtime\runtime.js:62:44
invoke
C:\Users\FTorres\Kscope18Expo\node_modules\regenerator-runtime\runtime.js:152:28

C:\Users\FTorres\Kscope18Expo\node_modules\regenerator-runtime\runtime.js:162:19
tryCallOne
C:\Users\FTorres\Kscope18Expo\node_modules\promise\setimmediate\core.js:37:14

C:\Users\FTorres\Kscope18Expo\node_modules\promise\setimmediate\core.js:123:25

C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Core\Timers\JSTimers.js:295:23
_callTimer
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Core\Timers\JSTimers.js:152:6
_callImmediatesPass
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Core\Timers\JSTimers.js:200:17
callImmediates
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\Core\Timers\JSTimers.js:464:11
__callImmediates
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:327:4

C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:145:6
__guardSafe
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:314:6
flushedQueue
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:144:17
invokeCallbackAndReturnFlushedQueue
C:\Users\FTorres\Kscope18Expo\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:140:11

@agracio
Copy link
Owner

agracio commented May 26, 2018

You need to provide context, what code causes that exception? <JsonTable> can be used inside other React components.

@franciscoamores
Copy link
Author

franciscoamores commented May 26, 2018 via email

@franciscoamores
Copy link
Author

franciscoamores commented May 26, 2018 via email

@franciscoamores
Copy link
Author

This is my code:

import React from 'react';
import {
Image,
Platform,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
Button,
} from 'react-native';

import { WebBrowser } from 'expo';

import { MonoText } from '../components/StyledText';

import JsonTable from 'ts-react-json-table';

export default class HomeScreen extends React.Component {
static navigationOptions = {
header: null,
};

constructor(props) {
super(props)

this.state = {

  JsonValue: []
  //JsonValue: 'test'

}

}

render() {

return (      
  <View style={styles.container}>
    <ScrollView style={styles.container} contentContainerStyle={styles.contentContainer}>
   

      <View style={styles.getStartedContainer}>
           
        <Button style={styles.buttonGo}
            onPress={this._handleGetProcessDetails}
            title="Refresh!"
        />  
        <JsonTable rows = {this.state.JsonValue} />                       
        
      </View>          
      
    </ScrollView>      
  </View>
  
  
);

}

_handleGetProcessDetails = () => {             
    
        
        this.setState({
          //JsonValue: jsonShow.toString()
          JsonValue : [{"id": 75950,"name": "Louella Wallace","age": 24,"phone": "+44 (0)203 437 7302","color": "green"}].toString()
          //JsonValue : JSON.stringify([{"id": 75950,"name": "Louella Wallace","age": 24,"phone": "+44 (0)203 437 7302","color": "green"}])
          //JsonValue : JSON.stringify(jsonArray)
        });
        
       

};

}

@agracio
Copy link
Owner

agracio commented May 26, 2018

Looks like you have 'react-native' specific problem: https://stackoverflow.com/questions/46750477/react-native-invariant-violation-view-config. By the looks of it you cannot use this component in 'react-native' app.

@franciscoamores
Copy link
Author

franciscoamores commented May 26, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants