Giter Site home page Giter Site logo

react-websocket's Introduction

WebSocket Chat App with React

This is a simple WebSocket chat application implemented using React.

Overview

The WebSocket Chat App allows users to communicate with each other in real-time through WebSocket connections. Users can send and receive messages instantly within the chat interface.

Features

  • Real-time communication using WebSocket technology
  • Send and receive messages instantly
  • Basic UI for sending and displaying chat messages

Prerequisites

Before running the application, ensure you have the following installed:

  • Node.js (v18 or later)
  • npm or yarn package manager

Getting Started

  1. Clone the repository
    git clone
    cd chat-app
    npm i  // install dependencies:
  1. runing the project

create an env file with your own server url or online server addresses like socketsbay.com

run the bellow command and start typing in it:

     npm run dev
  1. Open the browser Open your web browser and navigate to http://localhost:5173 to view the WebSocket Chat App.

Technologies Used

  • React.js
  • WebSocket (ws)
  • HTML/CSS

Directory Structure

chat-app/
│
├── public/
│   ├── index.html
│   └── ...
│
├── src/
│   ├── components/
│   │   ├── Chat.jsx
│   │   └── ...
│   ├── context/
│   │   ├── MessagesContext.jsx
│   │   └── ...
│   ├── hook/
│   │   ├── useWebSocket.jsx
│   │   └── ...
│   │
│   ├── App.js
│   ├── index.jsx
│   └── ...
│
├── package.json
└── README.md

react-websocket's People

Watchers

Mina jalili avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.