Skip to content

jacobp100/react-isomophic-demo

Repository files navigation

React Isomorphic Demo

See react-router-4 branch for React Router 4

See blog posts for details on implementations.

Open an issue if you need something clarifying.

Changes from Blog Post

Form Handling

In post 1, we put a separate form handlers for action creators inside the reducers. The concept of splitting the main action creator from the form validation remains the same. However, the form handling has now been moved to formDispatcher; and there is a new reducer for forms, which contains schema errors, submission errors, and whether a form is being submitted.

This centralised the form handling, and made it so that every form would always get relevant errors and submission state without any extra work. I highly recommend you follow this new way if using the form techniques discussed.

Running

This comprises of a client, server, and a quick API for demonstrational purposes.

To build the client, server, and api, run gulp. Gulp will put the client files in /dist, and the server and api files in /build (since dist is a public folder and we don't want to expose the server or api).

When the server and api are built, they can be run with node build/server and node build/api, respectively.

When the server is running, you can head to localhost:8080 in your browser. Try running this project with and without JavaScript---in Safari, this can be toggled in the Developer menu!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published