如何将新值推送到Store对象?

时间:2017-08-30 02:35:35

标签: reactjs redux react-redux flux

2017-08-30 00:14:37.034 Leaflet-US[86918:4332982] *** -[SnapItViewController retain]: message sent to deallocated instance 0x7fae4470d4c0

如果是上述数据结构,如何在Redux中添加新的foodList : { 'fruits' : ['apple', 'banana'], 'hamburgers: ['bigmac', 'crispy'] } 到水果?

kiwi

如何将新值推送到Store对象?

1 个答案:

答案 0 :(得分:4)

这应该有效:

import more_itertools as mit


iterable = "this is some string rec".split()
" ".join(mit.rstrip(iterable, pred=lambda x: x in {"rec", " "}))
# 'this is some string'

" ".join(mit.rstrip(iterable, pred=lambda x: x in {"rec", " "}))
# 'this is some string'