Giter Club home page Giter Club logo

react-project-legacy-'s Issues

Better AJAX Implementation

Unless proven otherwise, I believe it may be ideal to implement an AJAX solution that allows global options to be set. This way, variables such as server hostname or user token don't have to be constantly passed around to each action creator or component that uses it.

Note: Currently using superagent

Example

import Request from './services/Request'

Request.globals.hostname = 'http://someurl.com'
Request.globals.headers.Authorization = 'Bearer xxxxxxxx'

Isomorphic React Support

Perform initial load on the Node server to allow for faster page loads and hack-free support for search engine crawling.

Auth redirection in actions or store?

Putting the authentication redirection in the action creators make sense but may be an issue if the store hasn't been updated before the next (possible guarded) route is loaded.

Example: I am logged in and want to log out.

  1. Upon logging out I should be redirected to the login page.
  2. If I am still logged in while hitting the login page, I should be redirected to the home page.
  3. Currently, the transitionTo('login') method is being called prior to dispatching the LOGOUT action.

This would mean that the logout action would redirect you to the login page, only for it to send you back to the home page and then possibly sending you back to the login page once store is updated.

Add server.js for production env

At the moment, this boilerplate is only ready for dev and not production. We did this for MHM but since I'm not aware what parts of that are MHM specific, I'll defer to our React Captains™ for this implementation.

Form Validation Example

Forms can be kind of tricky in React + Flux, at least when it comes to form errors and validation. Adding a form example with input validation and/or server error would be super helpful.

Possible Resource

Stylus Support

Integrate stylus examples into the application along with recommended file structure for bundling styles with their related components. Ideally, it would be good to base this on the work we're doing internally with Helpful UI.

Also need to decide whether or not to allow JS to handle styling with import or use Gulp ahead of time to generate CSS based on the bootstrapping main.styl file we presently have.

File Structure Finalization + README

Need to solidify file structure and create an opinion based on common best practices for the file structure of components, stores, services, actions, etc. Once we have a standard created, we can begin publishing a README for it.

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.