react-native-sketch icon indicating copy to clipboard operation
react-native-sketch copied to clipboard

Multiple instances of Sketch component

Open gorork opened this issue 7 years ago • 1 comments

Is it possible to have several independent sketch elements? It seems only a single Sketch component is being loaded on the screen.

To be more specific - this what I'm trying to do:

Component1 contains a single Sketch component:

<View>
     <Sketch
          style={styles.notes}
          ref={sketch => {
            this.sketch = sketch;
          }}
          strokeColor="#999999"
          strokeThickness={2}
     />
</View>

Then, I create several Component1 instances:

<View>
     <Component1 />
     <Component1 />
     <Component1 />
</View>

I expect to see 3 independent Sketch components in which user can draw different strokes. However, only a single Sketch component actually being loaded.

gorork avatar Jan 25 '18 20:01 gorork

@jgrancher Any tips on what is limiting the number of Sketch instances being active?

gorork avatar Jan 30 '18 01:01 gorork