
Security News
upm Launches as a Fast, Tiny Package Manager Written in TypeScript
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.
@stardust-ui/react-bindings
Advanced tools
A set of components and hooks to build components libraries and UI kits.
@stardust-ui/react-bindingsA set of reusable components and hooks to build component libraries and UI kits.
NPM
npm install --save @stardust-ui/react-bindings
Yarn
yarn add @stardust-ui/react-bindings
useStateManager()A React hook that provides bindings for state managers.
The examples below assume a component called <Input> will be used this way:
type InputProps = {
defaultValue?: string;
value?: string;
onChange?: (value: string) => void;
};
type InputState = { value: string };
type InputActions = { change: (value: string) => void };
const createInputManager: ManagerFactory<InputState, InputActions> = config =>
createManager<InputState, InputActions>({
...config,
actions: {
change: (value: string) => () => ({ value })
},
state: { value: "", ...config.state }
});
const Input: React.FC<InputProps> = props => {
const [state, actions] = useStateManager(createInputManager, {
mapPropsToInitialState: () => ({ value: props.defaultValue }),
mapPropsToState: () => ({ value: props.value })
});
return (
<input
onChange={e => {
actions.change(e.target.value);
if (props.onChange) props.onChange(e.target.value);
}}
value={state.value}
/>
);
};
const [state, actions] = useStateManager(createInputManager)
const [state, actions] = useStateManager(
managerFactory: ManagerFactory<State, Actions>,
options: UseStateManagerOptions<Props>,
)
managerFactory - a factory that implements state manager APIoptions.mapPropsToInitialState - optional, maps component's props to the initial stateoptions.mapPropsToState - optional, maps component's props to the state, should be used if your component implements controlled mode.FAQs
A set of components and hooks to build components libraries and UI kits.
The npm package @stardust-ui/react-bindings receives a total of 21 weekly downloads. As such, @stardust-ui/react-bindings popularity was classified as not popular.
We found that @stardust-ui/react-bindings demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.

Security News
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.