jayeszee / rn-draw

React native draw tool for react native applications
50 stars 36 forks source link

Buttons #8

Closed bec-smith closed 6 years ago

bec-smith commented 6 years ago

Any idea on how to add the buttons like you did in the example? I tried linking buttons to clear/rewind using this.refs but it breaks everything.

clarksandholtz commented 6 years ago

I'm also having trouble getting this to work.

I'm using Expo 22.0.0 in a create-react-native-app and I have not ejected.

          <RNDraw
            containerStyle={{ backgroundColor: "rgba(0,0,0,0)" }}
            color={"#000000"}
            strokeWidth={4}
            clear={clear => {
              console.log("Clear called");
              this._clear = clear;
            }}
          />

That console.log("Clear called") never gets run. Any idea why that would be happening?

jayeszee commented 6 years ago

@clarksandholtz hello, can you confirm that you are on the latest version of the library? it should be 0.0.6 thanks! Its working fine on my end.

clarksandholtz commented 6 years ago

Sorry @jayeszee, I should've updated my post earlier. I just had to update to 0.0.6 like you say and it worked! Thanks!

jayeszee commented 6 years ago

@becnichelesmith i don't follow.. why are you using this.refs? Please follow what @clarksandholtz posted and you should be fine.