Example projects that use nokori with various frontend frameworks.
nokori works with every JS/TS frontend framework.
This repository contains examples for many of today's most popular frontend frameworks.
You can always reference the nokori Developer Docs for more information.
nokori makes it near effortless to add any database or API operation to your components without servers, APIs, or infrastructure to manage.
Because nokori is cloud-native, queries are managed centrally as Special Purpose Cloud Functions in the nokori UI. This uniquely allows you to keep your data operations close to your template logic without sacrificing code maintainability or reusability.
import nokori from '@nokori/js-sdk'
const nk = nokori('api_key')
async function create(formData: FormData){
const { data, error } = await nk.query.execute({
queryId: 'nk.q.-ddqHfqeZNihbChcAbf', //Global Cloud Query ID
context: {
name: formDate.get('name')
}
}
)
}
export default function FormComponent() {
return (
<form action={create}>
<input type="text" name="name" />
<button type="submit">Submit</button>
</form>
)
}
Annoyingly, different frameworks utilize .env files in their own way, often with non-obvious documentation.
For these examples, you must set your nokori API key in the .env file in this manner:
NOKORI_API_KEY={{YOUR_API_KEY}}
REACT_APP_NOKORI_API_KEY={{YOUR_API_KEY}}
VITE_NOKORI_API_KEY={{YOUR_API_KEY}}
VITE_NOKORI_API_KEY={{YOUR_API_KEY}}