Skip to content

Iphone IOS10 Safari array map function not work in react render  #200

Open
@ximing

Description

@ximing

React Easy State version: 7.0.0-alpha.1
Platform: Iphone IOS10 Safari

Describe the bug
in ios10 safari ,
use store wrap a array,
in react render function ,use this array's map function not render item

This is the right situation

image

This is the problematic situation

image

This is the source code
const datas = store({ list: [{ a: 1 }, { a: 2 }] });

function App() {
  const items = [];
  datas.list.forEach(item => {
    items.push(<div key={item.a}>{item.a}</div>);
  });
  return (
    <div className="App">
      <h1>Hello CodeSandbox</h1>
      {datas.list.map(item => {
        return <div key={item.a}>{item.a}</div>;
      })}
      <div>===============</div>
      {items}
    </div>
  );
}

export default view(App);

For tougher bugs

To Reproduce

https://codesandbox.io/s/react-easy-state-alpha-42dgc?file=/src/App.js


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions