
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
cra-template-react-declarative
Advanced tools
The most advanced CRM Boilerplate for React + TypeScript + Mobx. Contains snippets for automatic state management in a declarative style
Contains the most advanced
todo-list
which you ever seen!
yarn create react-app --template cra-template-react-declarative .
or
npx create-react-app . --template=react-declarative
import { FetchView, Breadcrumbs, One, FieldType, IField, usePreventLeave } from 'react-declarative';
import fetchApi from '../../helpers/fetchApi';
import history from '../../helpers/history';
interface ITodoOnePageProps {
id: string;
}
const fields: IField[] = [
{
type: FieldType.Line,
title: 'System info'
},
{
type: FieldType.Div,
style: {
display: 'grid',
gridTemplateColumns: '1fr auto',
},
fields: [
{
type: FieldType.Text,
name: 'userId',
title: 'User id',
outlined: false,
disabled: true,
},
{
type: FieldType.Checkbox,
fieldBottomMargin: "0",
name: 'completed',
title: "Completed",
disabled: true,
},
]
},
{
type: FieldType.Line,
title: 'Common info'
},
{
type: FieldType.Text,
name: 'title',
title: 'Title',
}
];
export const TodoOnePage = ({
id,
}: ITodoOnePageProps) => {
const fetchState = async () => await fetchApi(`/api/v1/todos/${id}`);
const Content = (props: any) => {
const {
data,
oneProps,
beginSave,
} = usePreventLeave({
history,
onSave: async () => {
alert(JSON.stringify(data, null, 2));
return true; // HTTP 200
},
});
return (
<>
<Breadcrumbs
withSave
saveDisabled={!data}
title="Todo list"
subtitle={props.todo.title}
onSave={beginSave}
onBack={() => history.push('/todos')}
/>
<One
handler={() => props.todo}
fields={fields}
{...oneProps}
/>
</>
);
};
return (
<FetchView state={fetchState}>
{(todo) => (
<Content todo={todo} />
)}
</FetchView>
);
};
export default TodoOnePage;
FAQs
The most advanced CRM Boilerplate for React + TypeScript + Mobx. Contains snippets for automatic state management in a declarative style
The npm package cra-template-react-declarative receives a total of 1 weekly downloads. As such, cra-template-react-declarative popularity was classified as not popular.
We found that cra-template-react-declarative 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
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.