Skip to content

Instantly share code, notes, and snippets.

@marcosrjjunior
Last active September 5, 2022 04:08
Show Gist options
  • Save marcosrjjunior/906628a2278f13d775080e90a03b0b23 to your computer and use it in GitHub Desktop.
Save marcosrjjunior/906628a2278f13d775080e90a03b0b23 to your computer and use it in GitHub Desktop.
tst
// DATA
// Initial JSON data
const people = [
{
id: 1,
name: 'Jennifer Connelly'
},
{
id: 2,
name: 'Tom Cruise',
children: [
{
id: 12,
name: 'Top Gun: Maverick'
},
{
id: 13,
name: 'Mission: Impossible'
}
]
},
{
id: 3,
name: 'Jim Carrey',
children: [
{
id: 14,
name: '1995',
children: [
{
id: 15,
name: 'Ace Ventura: When Nature Calls'
},
{
id: 16,
name: "Batman Forever",
},
]
},
{
id: 18,
name: '1998',
children: [
{
id: 22,
name: 'The Truman Show'
}
]
}
]
},
{
id: 4,
name: 'Milly Alcock'
},
{
id: 5,
name: 'Emma Stone',
children: [
{
id: 23,
name: 'La La Land'
},
{
id: 24,
name: 'The Amazing Spider-Man'
}
]
}
]
// FETCH DATA
function fetchData() {
return new Promise(resolve => {
setTimeout(resolve, 200, data)
})
}
// SYMBOLS
▼ ▶
// NEXT
- Display a native popup with the amount of items when hovering an element - "Items (2)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment