Last active
September 20, 2018 06:10
-
-
Save Sawtaytoes/dc0808e41f39989d1abd9692db6aa4cb to your computer and use it in GitHub Desktop.
Using `ReduxConnection` instead of `connect`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { ReduxConnection } from '@ghadyani-framework/redux-components' | |
const textSelector = ( | |
({ text }) => ( | |
text, | |
) | |
) | |
const TestComponent = ({ | |
text, | |
}) => ( | |
<ReduxConnection selector={textSelector}> | |
{({ text }) => ( | |
<div> | |
{text} | |
</div> | |
)} | |
</ReduxConnection> | |
) | |
export default TestComponent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment