Senior Fullstack React Golang Interview Prep
Senior Fullstack React Golang Interview Prep
React (Frontend)
- Lazy Loading
- Performance Bottlenecks
Use React DevTools Profiler. Avoid re-renders with React.memo, useMemo, useCallback. Split large components;
minimize DOM updates.
- useMemo vs useCallback
- Optimistic UI Updates
Update UI before server confirmation. Revert on error. Example: Show added todo item immediately.
- Preventing XSS
test('increments', () => {
render(<Counter />);
fireEvent.click(screen.getByText('Increment'));
expect(screen.getByText('1')).toBeInTheDocument();
});
Golang (Backend)
Goroutines: go func() {}
Channels: ch := make(chan int)
val := <-ch
- Race Conditions
Use gin-gonic/gin:
r := gin.Default()
r.GET('/users/:id', getUser)
- Middlewares
r.Use(func(c *gin.Context) {
log.Println(c.Request.URL)
c.Next()
})
- REST vs gRPC
- gRPC Compatibility
- gorm vs database/sql
req := httptest.NewRequest(...)
w := httptest.NewRecorder()
handler(w, req)
assert.Equal(t, 200, w.Code)
- httptest Role
System Design
Use microservices with gRPC. HSM for key management. PostgreSQL for ledgering, Redis for caching. Secure APIs.
- Notification System
Kafka/NATS for events, Redis pub/sub or WebSockets for real-time. Store notifications in DB.
Behavioral Questions
Modularized code, added tests, used feature flags for gradual rollout.
- Handling Disagreements
Senior Full Stack Developer (React + Golang) Interview Prep
Found input validation flaw, patched it, added tests and code reviews.