Coder Social home page Coder Social logo

Sync sockets. about socket-client HOT 2 CLOSED

reactphp-legacy avatar reactphp-legacy commented on September 13, 2024
Sync sockets.

from socket-client.

Comments (2)

cboden avatar cboden commented on September 13, 2024

Not at this time. React's initial design was to be fully asynchronous and evented through the Reactor. That being said, if handleData were to return a string this would be possible.

from socket-client.

clue avatar clue commented on September 13, 2024

👎 on introducing synchronous code in an async library

I've looked into this with @cboden, however I believe this requires more work than it appears to on the surface and is therefor a bad idea to introduce in React.

React's design is entirely based on the idea of async I/O and that blocking method calls must be avoided. This might seem confusing at first, and probably won't fit all people's needs. However, this provides some great features and performance not otherwise achieved in blocking implementations.

I believe there are better alternatives than using React if you need blocking methods calls.

from socket-client.

Related Issues (20)

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.