What do you want to save?
Add Code snippet
New code examples
-
Html 2021-09-15 09:41:03
how to make a music playlist html
<!-- There are several ways but if you are a begginer this is quite simpler--> <!--In Your JavaScript Code--> <script> <!-- Make an array of the song locations in javascript --> Arr = ['song1.mp3', 'song2.mp3', 'song3.mp3'] ... Add solution -
Javascript 2021-09-15 09:25:02
immer reducer hook use
import React from "react"; import { useImmerReducer } from "use-immer"; const initialState = { count: 0 }; function reducer(draft, action) { switch (action.type) { case "reset": return initialState; case &qu... Add solution -
Javascript 2021-09-15 07:12:04
passing html vlaues to Javascript function
<body> <h1>Adding 'a' and 'b'</h1> a: <input type="number" name="a" id="a"><br> b: <input type="number" name="b" id="b"><br> <button onclick=&q... Add solution -
Javascript 2021-09-13 03:33:03
React alert popup
import { confirmAlert } from 'react-confirm-alert'; // Import import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css class App extends React.Component { submit = () => { confirmAlert({ title: 'Confirm to submit', mes... Add solution -
Javascript 2021-09-11 09:26:02
change boolean value on click react
class Q1 extends Component { constructor(props) { super(props); this.state = { page1: false, page2:false, page3:false } this.handleClick1= this.handleClick1.bind(this); this.handleClick2= this.handleClick2.bind(this); this.hand... Add solution -
Javascript 2021-09-10 12:40:03
casl react
import { AbilityBuilder } from '@casl/ability'; import React, { useState, useContext } from 'react'; import { AbilityContext } from './Can'; function updateAbility(ability, user) { const { can, rules } = new AbilityBuilder(); if (user.role === 'admi... Add solution
Best helpers
Ranking is empty