![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A lightweight state management library for lilliepy, inspired by state management solutions like Zustand and XState.
Simply include the liiliepy_state.py
file in your project.
# Clone the repository (if applicable)
git clone <repository_url>
Create a state container to manage your application's state.
from liiliepy_state import StateContainer
# Define your store
counter_store = StateContainer({"count": 0})
# Define actions
def increment():
counter_store.set_state(lambda state: {"count": state["count"] + 1})
def decrement():
counter_store.set_state(lambda state: {"count": state["count"] - 1})
Connect your store to liiliepy components using the use_store
hook.
from reactpy import component, html
from liiliepy_state import use_store
from my_store import counter_store, increment, decrement
@component
def CounterComponent():
state, _ = use_store(counter_store)
return html.div(
html.button({"onClick": lambda: decrement()}, "-"),
html.span(f"Count: {state['count']}"),
html.button({"onClick": lambda: increment()}, "+"),
)
For more complex scenarios, use the FSMContainer
to add finite state transitions.
from liiliepy_state import FSMContainer
# Define state transitions
fsm_store = FSMContainer("idle", {
"idle": {"START": "running"},
"running": {"STOP": "idle"},
})
# Transition actions
def start():
fsm_store.transition("START")
def stop():
fsm_store.transition("STOP")
@component
def FSMComponent():
state, _ = use_store(fsm_store)
return html.div(
html.span(f"State: {state}"),
html.button({"onClick": lambda: start()}, "Start"),
html.button({"onClick": lambda: stop()}, "Stop"),
)
This project is licensed under the MIT License. Feel free to use and contribute!
FAQs
state manager for lilliepy framework
We found that lilliepy-state demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.