This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Button } from 'reactstrap'; | |
<Button color="primary">Tıkla</Button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Button } from '@chakra-ui/react'; | |
<Button colorScheme="blue">Tıkla</Button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Button from '@material-ui/core/Button'; | |
<Button variant="contained" color="primary"> | |
Tıkla | |
</Button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"> | |
Tıkla | |
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$primary-color: blue; | |
.button { | |
background-color: $primary-color; | |
&:hover { | |
background-color: darken($primary-color, 10%); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Button.module.css | |
.button { | |
background-color: blue; | |
color: white; | |
} | |
// yukarıdaki kısım bir css dosyasıdır | |
// aşağıdaki kısım bir js dosyasıdır | |
// Button.jsx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dispatch = useDispatch(); | |
dispatch(userActions.updateUser(newUser)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const user = useSelector((state) => state.user); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const userSlice = createSlice({ | |
name: 'user', | |
initialState, | |
reducers: { | |
updateUser(state, action) { | |
// burada kullanıcıyı güncelleyebiliriz | |
}, | |
}, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { configureStore, createSlice } from '@reduxjs/toolkit'; | |
const userSlice = createSlice({ | |
name: 'user', | |
initialState: { name: 'Guest' }, | |
reducers: { | |
setName: (state, action) => { | |
state.name = action.payload; | |
}, |
NewerOlder