DEV Community

Cover image for My Journey as a React Developer Intern at The Entrepreneurship Network
Utkarsh K
Utkarsh K

Posted on

My Journey as a React Developer Intern at The Entrepreneurship Network

Working as a React Developer Intern at The Entrepreneurship Network (TEN) was an exhilarating experience. It was a perfect blend of learning, coding, and solving real-world problems. From creating interactive UI components to optimizing web applications, every task added a new layer to my skills.

Let me take you through my journey, highlighting the challenges, learnings, and the fun moments along the way.


Getting Started: Laying the Foundations

The internship began with an introduction to the existing codebase. Understanding the architecture and grasping how React was used in the project were crucial first steps.

The first task? A simple yet critical component—a Reusable Button. It might sound basic, but designing a button that could adapt to various themes and functionalities was a great start.

// ReusableButton.js
import React from "react";
import PropTypes from "prop-types";

const ReusableButton = ({ label, onClick, styleType }) => {
  const styles = {
    primary: { backgroundColor: "#007BFF", color: "#fff" },
    secondary: { backgroundColor: "#6C757D", color: "#fff" },
  };

  return (
    <button style={styles[styleType]} onClick={onClick}>
      {label}
    </button>
  );
};

ReusableButton.propTypes = {
  label: PropTypes.string.isRequired,
  onClick: PropTypes.func.isRequired,
  styleType: PropTypes.oneOf(["primary", "secondary"]),
};

ReusableButton.defaultProps = {
  styleType: "primary",
};

export default ReusableButton;
Enter fullscreen mode Exit fullscreen mode

Lesson Learned: The simplest components often have the most impact when built with scalability in mind.


Building Dashboards: The Heart of React Apps

One of the major milestones was working on a User Dashboard. The challenge here was to display dynamic data fetched from APIs while ensuring the UI remained responsive and intuitive.

Here’s a snippet of the table component I built for the dashboard:

// DashboardTable.js
import React from "react";

const DashboardTable = ({ data }) => {
  return (
    <table>
      <thead>
        <tr>
          <th>ID</th>
          <th>Name</th>
          <th>Email</th>
          <th>Status</th>
        </tr>
      </thead>
      <tbody>
        {data.map((user) => (
          <tr key={user.id}>
            <td>{user.id}</td>
            <td>{user.name}</td>
            <td>{user.email}</td>
            <td>{user.status}</td>
          </tr>
        ))}
      </tbody>
    </table>
  );
};

export default DashboardTable;
Enter fullscreen mode Exit fullscreen mode

Pro Tip: Always validate API data before rendering to prevent crashes or glitches.


State Management: A Redux Adventure

As the project grew, managing the state became tricky. This was my first real-world experience using Redux, and it was a game-changer. I implemented a state management system to track user authentication and preferences.

// actions.js
export const login = (user) => ({
  type: "LOGIN",
  payload: user,
});

export const logout = () => ({
  type: "LOGOUT",
});

// reducer.js
const initialState = {
  isAuthenticated: false,
  user: null,
};

const authReducer = (state = initialState, action) => {
  switch (action.type) {
    case "LOGIN":
      return { ...state, isAuthenticated: true, user: action.payload };
    case "LOGOUT":
      return { ...state, isAuthenticated: false, user: null };
    default:
      return state;
  }
};

export default authReducer;
Enter fullscreen mode Exit fullscreen mode

This setup simplified managing authentication across the app, and debugging became far easier.


Chronology Table

Date Tasks Completed
Week 1 Explored the existing codebase, created reusable components, and learned the project's architecture.
Week 2 Developed a dynamic User Dashboard with API integrations.
Week 3 Worked on implementing Redux for state management.
Week 4 Built and tested forms for user feedback and data entry.
Week 5 Focused on performance optimization and debugging.
Final Week Presented the completed modules and documented key learnings for the team.

Form Magic: Handling Inputs Like a Pro

Creating forms in React can be tricky, but I mastered the art during this internship. From validation to dynamic field rendering, it was a fulfilling challenge.

// FeedbackForm.js
import React, { useState } from "react";

const FeedbackForm = () => {
  const [formData, setFormData] = useState({
    name: "",
    email: "",
    feedback: "",
  });

  const handleChange = (e) => {
    const { name, value } = e.target;
    setFormData({ ...formData, [name]: value });
  };

  const handleSubmit = (e) => {
    e.preventDefault();
    console.log("Form Submitted", formData);
  };

  return (
    <form onSubmit={handleSubmit}>
      <input
        type="text"
        name="name"
        placeholder="Name"
        value={formData.name}
        onChange={handleChange}
      />
      <input
        type="email"
        name="email"
        placeholder="Email"
        value={formData.email}
        onChange={handleChange}
      />
      <textarea
        name="feedback"
        placeholder="Your Feedback"
        value={formData.feedback}
        onChange={handleChange}
      />
      <button type="submit">Submit</button>
    </form>
  );
};

export default FeedbackForm;
Enter fullscreen mode Exit fullscreen mode

Takeaway: The key to great forms? Validation, user feedback, and a touch of creativity.


Reflections on the Internship

My time at The Entrepreneurship Network taught me that React is not just about components—it’s about creating seamless user experiences. Whether it was handling state, optimizing performance, or debugging tricky issues, every moment was a step toward becoming a better developer.

"Coding is an art, and every line you write shapes the user's experience."

This internship not only enhanced my technical skills but also instilled a sense of responsibility to create user-centric applications. I’m grateful for the opportunity and excited about the road ahead!

Top comments (0)