Giter VIP home page Giter VIP logo

state-less / react-server Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 861 KB

Introducing React Server, a powerful solution for building component-driven and modular server-side applications using React. Create server-side components just like you do on the frontend. Simplify your full-stack development and embrace the power of React on the server. Try it now!

Home Page: https://state-less.cloud

License: MIT License

JavaScript 1.42% TypeScript 98.58%
backend graphql react react-server typescript javascript

react-server's Issues

Implement `useQuery` hook

We need a way to directly query the database in order to obtain a list of states for a given scope and key. At the moment you need to use arrays to keep track of "lists". While this makes sense for finite lists, it doesn't make sense for lists with an indefinite / growing length, such as posts in a forum.

If we implement a reactive useQuery hook, we can directly pass client side paging props to the database and return a reactive / live query to the server which contains all states for the requested scope.

This also mitigates the need to reflect changes to a single post in the list itself such as approving a post as the useQuery already obtains all the needed information and rerenders the component if a state has been added to the lists.

Increase Code Coverage

We need to increase code coverage. React Server should be fully tested and any help writing tests is greatly appreciated.

Work out detailed guide and explanations on when to use `useState` and when `useQuery`

Once we implemented useQuery it replaces useState in some cases.

It's a must have for lists of an indefinite / constantly growing size. If you only have a finite number of states stored in a list then you can still use useState and keep track of your states / ids manually.

useState hasn't been optimized for large datasets. useQuery is generally preferable if you plan to increase the number of states stored in a list constantly over time.

See also #26

This involves

  • Writing a medium post
  • Adding detailed documentation
  • Asking stackoverflow questions

All this can be done by anyone who sufficiently understands react server and the two different approaches of storing and querying data.

Benchmark React Server Performance

We currently do not have a known limit for performance or any known bottlenecks. This needs to be tested and verified and converted into presentable numbers.

Troubleshooting

This will later contain guides to troubleshooting once common issues arise. You can use this thread as reference for common problems and how to solve them.

Add subscribe action

Add a flag to USE_STATE action to subscribe only to future changes, without sending the state to the client. This halves rerendering of components.

Path to StoreProvider doesn't get resolved correctly

Generation of component tree fails for dynamically rendered components if they get rendered outside its parent component. This happens when you map an array to components and the array changes. This can be solved by resolving the dynamically rendered components and creating a link in the tree.

Filling the Backlog on Trello

Note: We have a Trello Board for contributors. Please contact us if you need access to the board.

  • Backlog needs to be filled
  • Cards need to be refined
  • Bugs need to be created as issue in Github

Conceptualize Error Handling

We need to think about how to handle errors. Currently any error thrown on the serverside will be sent to the client over GraphQl. This may be helpful during development, but in a production environment you might not want to disclose sensitive information such as error messages or stack traces. This needs to be handled in a way that's flexible enough to transport errors during development but can be configured to suppress errors, e.g. in production

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.