![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
byob-cms is a react component for client only CMS There are three basic concepts in byob-cms:
config
"config" is an javascript object that contains all the info needed
for byob-cms to build the cms.
You should pass config into byob-cms component as a prop.
resource
"resource" is a RESTful concept.
You can do CRUD on the records in resources.
You can think of a resource as a class and a record as an instance,
or a resource as a model and a record as a document.
schema
We use https://github.com/mozilla-services/react-jsonschema-form package
to render forms in the cms. There for you can provide
jsonSchema and uiSchema to define the structure of the form.
We let you configure schemas for CRUD pages. "defaultSchema" is used
when you do not provide a schema for that CRUD type.
You can import this package as a component and give it a config prop.
import React from 'react';
import ReactDOM from 'react-dom';
import CMS from 'byob-cms'
ReactDOM.render(
<CMS config={config}/>,
document.getElementById('root')
);
const config = {
graphqlUrl: 'http://localhost:4000',
resources: [
{
name: 'drop',
uniqKey: '_id',
crudMapping: {
create: 'createDrop',
readMany: 'drops',
readOne: 'drop',
update: 'updateDrop',
// delete: 'deleteDrop',
},
readManySchema: {
jsonSchema: {
type: 'object',
properties: {
_id: 'string',
title: 'string',
}
}
},
defaultSchema: {
jsonSchema: {
title: 'Drop',
type: 'object',
required: [
'title',
'content',
'tagIds',
],
properties: {
title: {
type: 'string',
},
content: {
type: 'string',
},
lifeEventIds: {
type: 'array',
default: [],
items: {
type: 'string'
}
},
tagIds: {
type: 'array',
default: [],
items: {
type: 'string'
}
}
},
},
uiSchema: {
lifeEventIds: {
'ui:field': 'hasManyField'
},
tagIds: {
'ui:field': 'hasManyField'
},
},
}
},
{
name: 'tag',
uniqKey: '_id',
crudMapping: {
readMany: 'tags',
readOne: 'tag',
create: 'createTag',
update: 'updateTag',
delete: 'deleteTag',
},
readManySchema: {
jsonSchema: {
type: 'object',
properties: {
_id: 'string',
title: 'string',
}
}
},
defaultSchema: {
jsonSchema: {
title: 'Tag',
type: 'object',
required: [
'title',
'tagQuestionId',
],
properties: {
title: {
type: 'string'
},
tagQuestionId: {
type: 'string',
},
}
},
uiSchema: {
tagQuestionId: {
'ui:widget': 'hasOneWidget',
}
},
},
},
{
name: 'tagQuestion',
uniqKey: '_id',
crudMapping: {
readMany: 'tagQuestions',
readOne: 'tagQuestion',
create: 'createTagQuestion',
update: 'updateTagQuestion',
delete: 'deleteTagQuestion',
},
readManySchema: {
jsonSchema: {
type: 'object',
properties: {
_id: 'string',
title: 'string',
}
}
},
defaultSchema: {
jsonSchema: {
title: 'Tag Question',
type: 'object',
required: [
'title',
],
properties: {
title: {
type: 'string'
},
}
},
uiSchema: { },
},
},
]
}
mutation ${crudMapping.create}($input: ${upperFirst(resource.name + 'Input')}!) {
${crudMapping.create}(${resource.name} : $input)
}
mutation ${crudMapping.update}($input: ${upperFirst(resource.name + 'Input')}!) {
${crudMapping.update}(${resource.name} : $input, ${uniqKey}: "${uniqKeyValue}")
}
mutation ${crudMapping.delete}($${uniqKey}: String!) {
${crudMapping.delete}(${uniqKey}: $${uniqKey})
}
query ${crudMapping.readOne}($${uniqKey}: String!) {
${crudMapping.readOne}(${uniqKey}: $${uniqKey}) ${jsonSchemaToGqlQuery(readOneSchema.jsonSchema)}
}
query ${crudMapping.readMany} {
${crudMapping.readMany} ${jsonSchemaToGqlQuery(readManySchema.jsonSchema)}
}
function defaultCellFormatter (value) {
return <pre>
{JSON.stringify(value, null, 2)}
</pre>
}
import { CodeLogin } from 'byob-cms';
'ui:options': {
props: {
decimalScale: 0, // Blocks floats
allowNegative: false,
},
},
// by default gqlOptionsName is `${fieldName}Options`
query ${upperFirst(gqlOptionsName)}Query {
${gqlOptionsName} {
value
label
}
}
props:
blockType: 'unordered-list-item'
will begin your wysiwyg with an unordered list element.FAQs
Bring your own backend! A client side only cms that speaks graphQL.
The npm package byob-cms receives a total of 3 weekly downloads. As such, byob-cms popularity was classified as not popular.
We found that byob-cms demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
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.