Can you imagine being able to write an SQL clause and not worry about your backend or servers?
SELECT * FROM users LIMIT 100;
const View = () => { return <ListUsers />; };
Or even being able to create a complete flow for your application with short clauses:
-- <ListUsers /> SELECT * FROM users LIMIT 100; -- <User userId={id} /> SELECT * FROM users WHERE id = :userId; -- <UpdateUser userId={id} form={form} /> UPDATE users SET name = :name, image = :image WHERE id = :userId; -- <DeleteUser userId={id}/> DELETE FROM users WHERE id = :userId;
And if you didn't have to worry about developing the backend, deploying, connecting to a database, etc., how quickly could you develop and iterate your product?
Blokay is an open-source tool that allows developers to create backend code blocks, and it automatically generates the frontend for the component.
Blokay allows developers to create complete workflows and then progressively integrate them into their own applications.
Prompt: Show a table of the created users
It should generate something like this:
const fn = async function (args: Args) { let sql = `SELECT * FROM users ORDER BY id DESC LIMIT 100`; let results = await args.query(sql); return args.table(results); };
and consequently a ready-to-use React, Vue, Angular, etc. component.
const View = () => { return <ListUsers />; };
You can create a free account at blokay.com and start your project instantly.
The above is the detailed content of SQL to React Components in seconds. For more information, please follow other related articles on the PHP Chinese website!