All notable changes to this project will be documented in this file.
- add
useUnmount
hook that let you execute a callback when a component is unmounted.
- fix tsconfig.
- fix bad dom types export.
- add
<ErrorBoundary/>
component to catch unexpected errors. - add
useErrorBoundary
hook that can be used within the fallback of an<ErrorBoundary/>
component to geterror
or attemptrecovery
.
- reworked typing.
- bump
@riadh-adrani/dom-router
version.
- export missing
getParams
from router.
- bump
@riadh-adrani/domer
version. - bump
@riadh-adrani/dom-router
version.
- fixed
createDestination
throwing when used without a router.
createComposable
create a global hook that can be accessed from anywhere in the tree.useComposable
retrieve a namedcomposable
.unmountApp
used to unmount the current app instance.unmountRouter
used to unmount the current router instance.createDestination
create a valid url using a destination request.
- remake the framework from scratch and changed its architecture to be more expandable and dynamic.
- switched to
@riadh-adrani/domer
instead of@riadh-adrani/dom-utils
for DOM manipulations. - switched to
@riadh-adrani/dom-router
as the base of the routing system. navigate
now accepts a second parameterDestinationOptions
.
createStore
is removed, replaced bycreateComposable
.batch
no longer useful during to framework architectural change.replace
removed, you can setDestinationOptions.replace
totrue
instead.
- removed experimental hooks
useReactive
andusePromise
.
- optimized
actions
by collecting them while traversing the tree.
dom:focused
attribute that will try to focus the element when created, ignored after the first render.
innerHTML
todom:innerHTML
to indicate it's framework-specific.
- changing unmounted element position causes the app to crash.
- named
<Fragment/>
component.
class
attributes now accepts arrayables ofboolean
,undefied
ornull
.
- children not correctly reordered in some edge cases.
- allow the use of event modifiers without an actual function value
dom:tag
to make html element tag dynamic.
<Portal/>
element not properly changing containers.
innerHTML
attribute that allow direct setting of an HTMLElement innerHTML prop.- add event modifiers like
Vue.js
, in this formonEvent:prevent
,onEvent:stop
or bothonEvent:prevent-stop
.
- removed all
deprecated
functions and classes.
anchor
element not working as intended
name
route property, similar tovue-router
.titleTransform
handler to preprocess the title before applying it.createStore
similar towritable
store insvelte
navigate
now accepts a number or an object for anamed
route.
useKey
is now replaced withcreateStore
.Store
as it is becoming useless.
- Add
switch
,case
andcase:default
directives. - Attach host
Branch
object to dom node. ref
typing.
useState
accepts an initilizer function, and a setter callback.- improved project structure.
- improved typing.
- refactored project structure for a smaller bundle size.
else
andelse-if
directives that goes withif
directive, similar tovue.js
- improve
JSX.Element
s typing - better
svg
elements typing
if
directive which accepts a boolean to determine if a component should be rendered or not.PropWithUtility
that allow the developer to initialize a prop type with optionalchildren
,key
andif
properties.getPathname
returns the current url without thebase
.
useReactive
uses@riadh-adrani/utils/createReactive
to create reactive object instances.mountRouter
config is now optional.- deperecated
getRoute
in favor ofgetPathname
.
useContext
, same asreact.js
.useReactive
, similar tovue.js
'sreactive
.usePromise
, a hook that allows the user to fetch data while tracking the request state and return value.joinClasses
, a utility function that filter and returns a valid className as a string.getSearchQuery
, a function that returns the search params of the current route as a typed object.getRoute
, a function that returns the current url without thebase
.- added
SVG
elements with shallow typing. - creation of the docs website.
- add
titleSuffix
andtitlePrefix
as optional params inRouterParams
. - add
<Portal/>
component, allowing to teleport elements in another DOM container.
scrollToTop
not having any effect, when a new page is loaded.
- JSX syntax for writing expressive and reusable UI components.
- Function components for a modular and composable code structure.
- Hooks for managing state, performing side effects, and custom logic reuse:
useState
,useEffect
,useMemo
,useCallback
,useId
anduseRef
. - Synchronous rendering for a straightforward and beginner-friendly development experience.
- Intuitive API that closely resembles React's patterns and conventions.
- SPA Router.
- key-value Store.