![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.
Read the official docs at https://rapidjs.io.
var post = new Rapid({ modelName: 'Post' });
post.find(1).then((response) => {
// GET => /api/post/1
});
post.collection.findBy('category', 'featured').then((response) => {
// GET => /api/posts/category/featured
});
post.withParams({ limit: 20, order: 'desc' }).all().then((response) => {
// GET => /api/posts?limit=20&order=desc
});
post.update(25, { title: 'Rapid JS Is Awesome!' })
// POST => /api/posts/25/update
post.destroy(9)
// POST => /api/posts/9/destroy
Read more about Rapid Basics.
var post = new Rapid({
modelName: 'Post',
suffixes: {
destroy: '',
update: 'save'
},
methods: {
destroy: 'delete'
},
trailingSlash: true
});
post.update(25, { title: 'Rapid JS Is Awesome!' })
// POST => /api/posts/25/save/
post.destroy(9)
// DELETE => /api/posts/9/
Read more about Customizing Your Requests.
class Base extends Rapid {
boot () {
this.baseURL = 'https://myapp.com/api';
this.config.globalParameters = { key: 'MY_API_KEY' }
}
}
var photo = new Base({ modelName: 'Photo' });
var gallery = new Base({ modelName: 'Gallery' });
var tag = new Base({ modelName: 'Tag' });
photo.find(1)
// GET => https://myapp.com/api/photo/1?key=MY_API_KEY
tag.collection.findBy('color', 'red')
// GET => https://myapp.com/api/tags/color/red?key=MY_API_KEY
gallery.id(23).get('tags', 'nature')
// GET => https://myapp.com/api/gallery/23/tag/nature?key=MY_API_KEY
Read more about Base Models.
class GalleryWrapper extends Rapid {
boot () {
this.baseURL = 'https://myapp.com/gallery/api';
this.modelName = 'Gallery';
}
tagSearch (query) {
return this.url('tagsearch').withParam('query', query);
}
json () {
return this.url('json');
}
}
var gallery = new GalleryWrapper({
globalParameters: { key: 'MY_API_KEY' }
});
gallery.tagSearch('nature').json().get().then(...);
// GET https://myapp.com/gallery/api/tagsearch/json?query=nature&key=MY_API_KEY
// GET https://myapp.com/gallery/api/tagsearch/json?query=nature&key=MY_API_KEY
Read more about Making a Wrapper.
const customRoutes = [
{
name: 'web_get_user_preferences',
type: 'get',
url: '/user/preferences',
},
{
name: 'web_save_user_preferences',
type: 'post',
url: '/user/{id}/save/preferences'
}
];
const router = new Rapid({ customRoutes, baseURL: '/api' });
router.route('web_get_user_preferences').then((response) => {});
// GET => /api/user/preferences
router.route('web_save_user_preferences', { id: 12 }, /* { request data } */).then((response) => {});
// POST => /api/user/12/save/preferences
import http from 'some-http-service';
const customRoutes = [
{
name: 'web_login',
url: '/login'
},
{
name: 'api_save_user_preferences',,
url: '/user/{id}/save/preferences'
}
];
const rapid = new Rapid({ customRoutes, baseURL: '' });
rapid.generate('web_login')
// returns '/login'
// use your own service
http.post(rapid.generate('api_save_user_preferences'), { id: 1 }).then()...
Read more about Custom Routes.
Read the official docs at https://rapidjs.io.
FAQs
Unknown package
The npm package rapid.js receives a total of 0 weekly downloads. As such, rapid.js popularity was classified as not popular.
We found that rapid.js 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
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.