You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our apps, we use React context to store global implicits; eg: logger, effect type-class instances, web client backends, etc.
I'm thinking it would be nice to have something like, leveraging Scala 3's context functions:
ScalaFnComponent
.withHooks[Props]
.useImplicitContext(MyContext.ctx)
.useEffectBy( props =>// Theres an implicit `MyContext` in scope here; ie. this is a `MyContext ?=> Callback`
)
.useState(0)
.render( (props, state) =>// Theres an implicit `MyContext` in scope here; ie. this is a `MyContext ?=> Callback`
)
In our apps, we use React context to store global implicits; eg: logger, effect type-class instances, web client backends, etc.
I'm thinking it would be nice to have something like, leveraging Scala 3's context functions:
WDYT @japgolly ?
The text was updated successfully, but these errors were encountered: