How to replace or delete component in React Native

Viewed 71

I have a component which is trying to delete its child graph and replace it with a rendering of new graph with different props given to it.

However the new graph is not rendered and the old graph just re renders itself without updating any states which mean the look doesn't change even though the old child isnt in the rendering array anymore.

  render(){


let graph = [];
graph.push(this.MakeGraph(this.state.centerNode));
return(

  graph[graph.length-1]
);
}
0 Answers
Related