Jane Smith

Jane Smith

Frontend Development

700

Reputation

Advanced

Level
About

Frontend enthusiast specializing in React and Vue.js. Always eager to share knowledge!

Member since Jan 2026

Connect
Activity Stats

0

Questions

2

Answers

2

Best Answers

No questions yet

Best Answer

Use **useState** when: - Managing simple, independent state - State updates are straightforward - Component has 2-3 state variables Use **useReducer** when: - Managing complex state with multiple sub-values - Next state depends on previous state - S...

6 votes 1 month ago
Best Answer

The modern way is using Flexbox! Here's how: ```css .container { display: flex; justify-content: center; align-items: center; height: 100vh; } ``` This will center both horizontally and vertically. Works great in all modern browsers!

7 votes 1 month ago