folofse / androw

Shadows in React Native for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Components wrapped with Androw doesnt rerender on old Android

albeitreluctantly opened this issue · comments

Hi. There's an issue with updating components view. On android 9 everything's fine. I have not tested on 8, but on android 7 component wrapped with Androw becomes static, it updates it's view only once.

const Component:FC = () => {
const [buttonName, setButtonName] = useState('Button')

useEffect(()=> {
setTimeout(() => {
  setButtonName('Definitely not button')
 }, 1000)
})

return <Androw><Button>{name}</Button></Androw>
}

In that example code the button's name will always remain 'Button'.

@Solistratos, Yes, it seems like the rerender not triggers in Android 7.0. I will look in to this and see if I can find any solution.

@Solistratos, in RNAndrowLayout.java inside dispatchDraw(Canvas canvas), removing the else and moving super.dispatchDraw(canvas); outside fixed the issue. In this case super.dispatchDraw(canvas); always will be called.

Will test it in few more devices and if it works will submit a PR for this fix.

commented

Still not working in android 5.