RCTView has a shadow set but cannot calculate shadow efficiently

See original GitHub issue

Version

  • react-native-router-flux v3.2.6
  • react-native v0.23.0-rc3

Expected behaviour

Load my scenes without warning

Actual behaviour

Everything works, but I have this react-native yellow warning

View #8 of type RCTView has a shadow set but cannot calculate shadow efficiently. Consider setting a background color to fix this, or apply the shadow to a more specific component.

Steps to reproduce

This is my router configuration

export default class App extends Component {
  render () {
    return (
      <Router createReducer={reducerCreate}>
        <Scene key='root'>
          <Scene key='home' component={Home} title='Home' />
        </Scene>
      </Router>
    )
  }
}

If I remove the router and I render the Home component directly, I don’t have the warning message anymore.
Do you have any clues about which component is the error referring?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

23reactions
harishbelamkarcommented, Sep 26, 2018

check you style type properties of View. If you are using any opacity/shadow/shadowOffset property ,remove those properties will work fine!

5reactions
aksonovcommented, Apr 1, 2016

I think it is because transparent background for scenes. Anyway it is not this component issue but React Native one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

View has a shadow set but cannot calculate shadow efficiently.
In our app we are applying a shadow to an Image component. Unfortunately that generates the following warning: View ... of type RCTImageView ......
Read more >
view has a shadow set but cannot calculate shadow efficiently
I'm getting this error message: >View #54 of type RCTView has a shadow set but cannot calculate shadow efficiently.
Read more >
Developers - RCTView has a shadow set but cannot calculate ...
RCTView has a shadow set but cannot calculate shadow efficiently.
Read more >
of type RCTView has a shadow set but cannot calculate ... - 简书
of type RCTView has a shadow set but cannot calculate shadow efficiently. Consider setting a background color to fix this, or apply the...
Read more >
App Crash IOS plss help (Fixed) - iOS - React Native WebRTC
... RCTView has a shadow set but cannot calculate shadow efficiently. Consider setting a background color to fix this, or apply the shadow ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found