jedireza / hapi-react-views

:package: A hapi view engine for React components
MIT License
231 stars 33 forks source link

view helpers #16

Closed lawrencec closed 9 years ago

lawrencec commented 9 years ago

Is is possible to use view helpers in the react views? For instance, I'm trying to use hapi-named-routes [1] in the views to generate urls correctly. If not, what's the best practice for utilising useful methods (mixins?) in react views that require server context.

[1] https://github.com/poeticninja/hapi-named-routes

jedireza commented 9 years ago

Thanks for opening an issue. Apologies for the late reply.

We do pass the context object as props to the views. https://github.com/jedireza/hapi-react-views/blob/master/index.js#L26

Have you tried this an it doesn't work?

tjwebb commented 7 years ago

I am passing context to reply.view but nothing is showing up in props

jedireza commented 7 years ago

@tjwebb this issue is 2 years old. If you need help please open a new issue.