package util
Ordering
- Alphabetic
Visibility
- Public
- All
Value Members
-
object
shift
shift
creates a new FunctionalComponent render step from provided bodyshift
creates a new FunctionalComponent render step from provided bodyReact hooks cannot be used with regular class-based components, and separating parts of state or using regular context API can be annoying. Shironeko Containers also have no place to specify an extra local state, which might be desirable in several scenarios.
shift
adds extra FunctionalComponent render layer, enabling use of hooks in both class-based components and ShironekoContainer
componentsdef render(stateFromStore: State): ReactElement = shift { implicit val locale = Hooks.useContext(LocaleCtx) val (name, setName) = Hooks.useState("") val (age, setAge) = Hooks.useState(22) div(???) }