V
V
Valera Velery2019-11-05 13:38:25
HTML
Valera Velery, 2019-11-05 13:38:25

Why does a button created with a styled component only fire 2 times?

Why does a button created with a React styled component only fire 2 times? default button works immediately here is the button creation code

const SendButton = styled.button`
        z-index:100;
        background:orangered;
        margin: 0 auto;
        border: none;
        font-size: 20px;
        padding: 5px 10px;
        color: white;
        &:hover {
        cursor:pointer;
        }
        &:focus {
        outline: none;
        }
    `;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valera Velery, 2019-11-05
@valera213123

Кр4 this button code needs to be pulled out of the functional component and everything will work correctly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question