Skip to content

View not updated with preact-redux and immutable #282

Description

@delta-9

I use Preact and preact-redux, with an immutable state.

I have a PictureList component connected to the state, and the props are updated. (I log nextProps in componentShouldUpdate() and in render())

When I start the app PictureList is empty, then I receive a list of ID and I print one component (Picture) by id (with map)..

The render() function of my PictureList component is called after the state update, but.. the DOM is not updated, and the components of the list are not mounted (Picture componentDidMount is never called)

I have no errors, I use ES6 Component, and preact-compat. When I switch to react everything work as expected.

I think there is a link with the immutable state because when I pass an array instead of an immutable List to the props, the DOM and the Picture's component are mounted.

I didn't found any discussion on the use of immutable with Preact, so I'm not sure if someone already had this problem and can point me to a solution..

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions