raveclassic / frp-ts

Functional reactive values-over-time
MIT License
79 stars 8 forks source link

usePropertyFromProps inconsistency #81

Open prodderman opened 4 months ago

prodderman commented 4 months ago

Hi @raveclassic!

There is a problem with usePropertyFromProps - the atom changes after the render and at the moment of the react props change value !== property.get():

const Component = ({ value }) => {
  const property = usePropertyFromProps(value)

  property.get() === value // false at the moment of the props change 
}