peter-mach / react-navigation-is-focused-hoc

Ready to use solution using HOC to expose props.isFocused for react-navigation. No Redux needed.
MIT License
169 stars 21 forks source link

Fixed to conform to decorator pattern #10

Closed pencilcheck closed 6 years ago

pencilcheck commented 7 years ago

So instead of writing

export default withNavigationFocus(MyScreenView, 'MyScreenView')

You can write

@withNavigationFocus('MyScreenView')
export default class MyScreenView ...
peter-mach commented 6 years ago

Thank you for this PR. This indeed introduced decorators support but broke normal HOC support. I'm closing it as I've implemented it in v1.1.0