Skip to content

v1.0.0

Compare
Choose a tag to compare
@gaearon gaearon released this 24 Aug 17:21
· 1386 commits to master since this release

We're stable!

Breaking Changes

The function passed to <Provider> now has to return an element. In all valid circumstances this should already be the case for your app. For example, <Provider store={store}>{() => 42}</Provider> or <Provider store={store}>{() => {}}</Provider> used to work, but made no sense. Now we're forcing you to return a single valid element.

Improvements

If you use React 0.13, you will see a warning if you attempt to pass a React element instead of a function to <Provider>. For example, <Provide store={store}><MyApp /></Provider> now produces a warning with React 0.13.

However, if you use React 0.14 (currently available as a beta, soon to be released), you can finally pass just the React element! For example, with React 0.14 and React Redux 1.0, you can write <Provider store={store}><MyApp /></Provider>. In fact React Redux will warn you if you use the function syntax together with React 0.14, as it is no longer needed.