Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
react-to-component
Advanced tools
Blazing fast library to componentify imperative or functional apis
:rocket: Blazing fast and tiny library that enables you to create react components (componentify) imperative or functional apis.
yarn add react-to-component
<ToComponent original={oldLegacyCodeApi} params={[1, 2, 3]}>
{({ loading, error, data }) =>
loading ? "Loading" : error ? "Oops, error" : JSON.stringify(data)
}
</ToComponent>
Prop | Required | Default | Type | Description |
---|---|---|---|---|
original | ✔️ | ✖️ | (...params: P[]) => Promise<T> or T | The original function to be encapsulated |
params | ✔️ | ✖️ | P[] | The params that will be used in the function invocation |
children | ✔️ | ✖️ | ({ data: T or null, error: Error or null, loading: boolean }) => JSX.Element or JSX.Element[] or null | The render prop that controls you data flow |
parametersDidChange | ✖️ | Params equality | (previousParams: P[], nextParams: P[]) => boolean | Ability to supply a custom check for parameter equality, use this if for example you need to ignore some parameters for caching purposes |
FAQs
Blazing fast library to componentify imperative or functional apis
The npm package react-to-component receives a total of 2 weekly downloads. As such, react-to-component popularity was classified as not popular.
We found that react-to-component demonstrated a not healthy version release cadence and project activity because the last version was released 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.