Skip to content

Instantly share code, notes, and snippets.

@Sawtaytoes
Last active September 20, 2018 06:10
Show Gist options
  • Save Sawtaytoes/dc0808e41f39989d1abd9692db6aa4cb to your computer and use it in GitHub Desktop.
Save Sawtaytoes/dc0808e41f39989d1abd9692db6aa4cb to your computer and use it in GitHub Desktop.
Using `ReduxConnection` instead of `connect`.
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