![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.
@ceski23/stan-js-angular
Advanced tools
This library provides an Angular adapter for [stan-js](https://github.com/codemask-labs/stan-js), enabling integration with Angular applications.
This library provides an Angular adapter for stan-js, enabling integration with Angular applications.
Adapter allows to use of all features from stan-js Features
Install package using preferred package manager:
npm install stan-js
# or
yarn add stan-js
# or
bun add stan-js
Create a store with initial state:
You can think of a store as your app state. You can define multiple keys/values, each key will be available to use as signal. By adding a getter to the state object, you can have a computed state that manipulates values from the state. Remember to import createStore
function from @ceski23/stan-js-angular
import { createStore } from '@ceski23/stan-js-angular'
export const appStore = createStore({
counter: 0,
textField: 'Hello World!',
currentTime: new Date(),
get upperCaseTextField() {
return this.textField.toUpperCase()
},
})
To use store in your app firstly you need to provide it:
import { appStore } from './store'
@Component({
// ...
providers: [
appStore.provideStore(),
],
// ...
})
and then you can inject store or state:
store = appStore.injectStore()
state = appStore.injectStoreState()
To read state value simply call each signal:
this.state.counter()
To update state field value use signal method's like set()
or update()
:
this.state.counter.update(counter => counter + 1)
this.state.counter.set(0)
You can also reset state field to initial value by calling reset()
function on store
object providing state field name as argument:
this.store.reset('counter')
You can find full usage example in this section.
FAQs
This library provides an Angular adapter for [stan-js](https://github.com/codemask-labs/stan-js), enabling integration with Angular applications.
The npm package @ceski23/stan-js-angular receives a total of 6 weekly downloads. As such, @ceski23/stan-js-angular popularity was classified as not popular.
We found that @ceski23/stan-js-angular 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.