Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@lovelope/create-factory
Advanced tools
Readme
@lovelope/create-factory
CreateFactory
is a high-level component used to manage editing pages and details pages; it is mainly responsible for data pulling and updating.
npm i -S @lovelope/create-factory
# OR
yarn add -S @lovelope/create-factory
import CreateFactory from '@lovelope/create-factory';
import React from 'react';
import { Form } from 'antd';
import { getUserInfo, putUserInfo } from './services';
const FormItem = Form.Item;
// this page's path is /user/edit/:userId
@CreateFactory({
key: 'userId',
getAction: getUserInfo,
putAction: putUserInfo,
})
class Email extends React.Component {
render() {
const {
form: { getFieldDecorator },
} = this.props;
return (
<Form>
<FormItem label="username">
{getFieldDecorator('name')(<Input />)}
</FormItem>
<FormItem label="Eamil">
{getFieldDecorator('email')(<Input />)}
</FormItem>
</Form>
);
}
}
Property | Description | type | required | default |
---|---|---|---|---|
key | ID value defined in routing URL | string, number | false | 'id' |
getAction | The function that pulls the form data when it is initialized | () => promise | false | -- |
putAction | Submit the function to be called after editing the form | () => promise | false | -- |
postAction | The function to be called when adding a new form | promise | false | -- |
mapPropsToFields | The formatting function of the data that getAction is filled in before the form item is filled in. | function | false | () => {} |
initialValues | Form default values | object | false | {} |
FAQs
Lightweight higher order components for edit page or detail page.
The npm package @lovelope/create-factory receives a total of 0 weekly downloads. As such, @lovelope/create-factory popularity was classified as not popular.
We found that @lovelope/create-factory 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.