Как использовать всплывающую подсказку в ReactCSS

Разбираемся в CSS
Ответить Пред. темаСлед. тема
Anonymous
 Как использовать всплывающую подсказку в React

Сообщение Anonymous »


I am creating my Portfolio and in the skills section I want to add a tooltip on the image for the name of the skill. following is my SkillCard.jsx and .css I am facing error as

Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app SkillCard.jsx
import React from 'react'; import './SkillsInfoCard.css'; const SkillsInfoCard = ({ heading, skills }) => { const renderSkillInfo = (item) => (
Изображение
); const renderRows = () => { const rows = []; for (let i = 0; i < skills.length; i += 4) { const row = skills.slice(i, i + 4); rows.push( {row.map(renderSkillInfo)} ); } return rows; }; return ( {renderRows()} ) }; export default SkillsInfoCard;

Источник: https://stackoverflow.com/questions/780 ... p-in-react
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «CSS»