question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[react-native] Components never updates

See original GitHub issue

Version

2.2.2 - native

Steps to reproduce

  1. create a simple Native styled component.
const CustomText = styled(Text)`
     color: ${props.light ? "white" : "black};
`
  1. Change the props in execution with a button or whatever.
  2. The component won’t update.

Expected Behavior

The component re-renders

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
exentrichcommented, Oct 25, 2017

Agree, this code not working in 2.2.2 opacity: ${({visible})=>visible?1:0}

1reaction
kittencommented, Oct 29, 2017

I’ll investigate this real quick and try to create a reliable reproduction 😄

Edit Update 1: Can confirm the bug https://github.com/philpl/sc-2.2.2-update-bug Edit Update 2: Found the bug, fixing it now

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Hooks Not Updating Component when State ...
When I added some debug logging to the useEffect() , I was able to confirm that state was changing, and items displayed it's...
Read more >
Component not updating after data changes in React Native
However, after running my app in an emulator (Genymotion) it doesn't update the Listview based on the data changes I made to the...
Read more >
Why React doesn't update state immediately - LogRocket Blog
State updates in React are asynchronous; when an update is requested, there is no guarantee that the updates will be made immediately.
Read more >
Why isn't my React component updating (using Redux)?
Your useSelector is subscribing to the value in the store, but its value is not updated at all. Never mutate the state in...
Read more >
React.Component
This page contains a detailed API reference for the React component class definition. ... Updating. An update can be caused by changes to...
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