Skip to content

Shadow Component Not Working as Expected with Nested TouchableOpacity #1

@YOEL311

Description

@YOEL311

Hi,

Firstly, thank you for your hard work and professional effort in creating this repository.

I've encountered an issue where the shadow component does not behave as expected when a TouchableOpacity component is nested inside it. Specifically, the background color of the shadow becomes visible and appears prominently.

screencap-2024-05-13T120745.717Z.mp4
import React from 'react';
import {StyleSheet, TouchableOpacity, View} from 'react-native';
import {SkiaShadow} from 'react-native-skia-shadow';

const App = () => {
  return (
    <View style={styles.container}>
      <SkiaShadow blur={5} dx={0} dy={0} color="blue" borderRadius={9999}>
        <TouchableOpacity>
          <View style={styles.circle} />
        </TouchableOpacity>
      </SkiaShadow>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
  circle: {
    width: 150,
    height: 150,
    borderRadius: 9999,
    backgroundColor: 'red',
  },
});
export default App;


repo to reproduce it
https://github.com/YOEL311/testRNSHhadow

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions