Improve standard view template
Summary: As soon as any data was send to a freshly generated plugin, the plugin would crash as React doesn't support directly rendering data. Replaced it with a poor mans rendering that simply dumps all the data we received. Also made sure the view is scrollable now which wasn't the case before. Reviewed By: jknoxville Differential Revision: D21523816 fbshipit-source-id: 3e04799facdf8b66ce9d66217a47fc7826d58d43
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7536c0e930
commit
310a76d03f
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import {FlipperPlugin, FlexColumn, KeyboardActions} from 'flipper';
|
||||
import {FlipperPlugin, View, KeyboardActions} from 'flipper';
|
||||
|
||||
type State = {};
|
||||
|
||||
@@ -37,11 +37,11 @@ export default class extends FlipperPlugin<State, any, PersistedState> {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<FlexColumn>
|
||||
<View scrollable>
|
||||
{this.props.persistedState.data.map((d) => (
|
||||
<div>{d}</div>
|
||||
<div>{JSON.stringify(d, null, 2)}<hr/></div>
|
||||
))}
|
||||
</FlexColumn>
|
||||
);
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user