App Library
@dile/lib is a package of components and mixins for building complete
applications with minimal effort — covering feedback messages, user session state, and the
routing system, so you don't wire up the same app-level plumbing every time.
What does @dile/lib offer?
This package provides a set of core features for applications, including:
Ready-made slices for managing basic application features:
UserSlice, for user managementFeedbackSlice, for feedback messages and loading states
Components that work directly with the Redux store:
- Components for displaying feedback messages
- Components for showing loading indicators
Components that help with routing system features:
- A route guard that redirects unauthorized or unauthenticated users
- Link components that trigger the routing system when clicked
Mixins that remove boilerplate from common app tasks:
- Navigation using the routing system
- Sending feedback messages and loading states
- Syncing components with the Redux store
@dile/lib requires Redux and Redux Toolkit and
Lit Router to unlock its full potential. Starting a new app with these modules,
components, and mixins is still much faster than building the equivalent from scratch — the
benefits easily justify the extra dependencies.
Modules and components in this package
State management
feedbackSlice
Centralizes feedback messages and loading state in the Redux store.
userSlice
Manages the logged-in user's data and authentication state in the Redux store.
DileFeedback
Adds methods to show toast messages, modals, and loading states from any component.
DileState
Subscribes a component to Redux store changes so it reacts automatically.
Routing
App components
DileAppFeedback
A factory for a toast component that displays Redux-driven feedback messages.
DileAppModalFeedback
A factory for a modal component that displays Redux-driven feedback messages.
DileAppLoading
A factory for a loading indicator connected to the Redux store.
DileRouterLink
A link component that navigates through the routing system instead of the browser.
dile-components