LOKKEE
LOKKEE
KPCKevin Powell - Community
Created by LOKKEE on 9/10/2023 in #front-end
Optimized way of implementing Hero background Video
Does any of you have some experiencing with optimizing a video, which is played, in loop and with autoplay, the background of a website's hero? It is currently quite large (around 10MB), which is clearly too much for a user to download, but it still needs to be of fairly good quality Thank you in advance! 😊
418 replies
KPCKevin Powell - Community
Created by LOKKEE on 3/8/2023 in #front-end
Eslint: Unresolved Module Errors in "Monorepo"
17 replies
KPCKevin Powell - Community
Created by LOKKEE on 2/10/2023 in #front-end
preventDefault() not preventing page refresh on form submit in React
I am currently building a form and somehow the page refreshes when the form is submitted, even though I call preventDefault() in onSubmit. Here is a minified version of my React form component:
import { FormEvent } from 'react';

function ContactForm() {
function sendEmail(event: FormEvent<HTMLFormElement>) {
event.preventDefault();

// send email logic
}

return (
<form
onSubmit={sendEmail}
>
<!-- input fields -->
<button
type="submit"
>
Submit
</button>
</form>
import { FormEvent } from 'react';

function ContactForm() {
function sendEmail(event: FormEvent<HTMLFormElement>) {
event.preventDefault();

// send email logic
}

return (
<form
onSubmit={sendEmail}
>
<!-- input fields -->
<button
type="submit"
>
Submit
</button>
</form>
Help is much appreciated! 🙂
5 replies
KPCKevin Powell - Community
Created by LOKKEE on 1/9/2023 in #front-end
Issues with module resolution
1 replies