This repository was archived by the owner on Oct 19, 2018. It is now read-only.
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
StateWrapper doesn't do set_state when using []= #174
Open
Description
Here is a falling test case
it 'is supposed to work' do
k = Class.new {
include React::Component
before_mount do
state[:foo] = 'bar'
end
def render
div { state.foo }
end
}
expect(k).to render('<div>bar</div>')
end
The current implementation only update the cached Hash of the backing state. I think this is a bug and could be fixed by actually invoking State.set_state
.
/cc @catmando