134 Commits

Author SHA1 Message Date
003bccc9e8 projects/node: Add custom redirectTo after successful login 2019-03-18 13:13:52 +05:00
8733dc2c30 projects/node: Add Buildfile for packages/client 2019-03-18 12:46:10 +05:00
cf8aefd099 Add custom Redirect component
react-router v4 was made before React introduced a more performant
function renderToNodeStream to replace renderToString. All guides for
react-router are made using renderToString method, but I would love to
use the renderToNodeStream instead.

Since we cannot issue a 302 redirect after the page has already been
rendered (because status codes are written first), we can display a
<a> link with a text message. Once the React client-side library
hydrates the DOM Tree, the redirect should happen client side, so no
user action should be required.

This idea was taken from:
https://github.com/ReactTraining/react-router/issues/6191
2019-03-17 19:59:46 +05:00
3fae7adc4a Add isClientSide helper for server-side rendering 2019-03-17 19:42:26 +05:00
5f039f5f86 Add type to react-router context variable 2019-03-17 19:27:55 +05:00
85d5fd1110 Clear register & login forms after submit 2019-03-17 19:27:39 +05:00
5a34885605 Add withForm HOC, as well as RegisterForm 2019-03-17 15:05:02 +05:00
c2c72457db Add LoginForm to comments 2019-03-17 11:20:34 +05:00
49b77403f6 Add sample Nav 2019-03-16 16:57:09 +05:00
7b682c745c Fix react-router-dom for server-side rendering 2019-03-16 12:31:18 +05:00
10b034e7f0 Add react-router-dom, TODO fix SSR 2019-03-16 12:20:55 +05:00
360dc83ded Setup simple SSR, untested 2019-03-14 12:38:34 +05:00
6c2728228e Add render to comments-client 2019-03-13 19:07:49 +05:00
3257a6ffb4 Extract createStore into a separate module 2019-03-13 16:46:55 +05:00
ae670c8ea3 Fix compilation errors in @rondo/comments-client 2019-03-13 14:09:14 +05:00
93584575d9 Fix compile error in packages/client 2019-03-13 13:48:17 +05:00
2ed3aeac26 Add Routes to application 2019-01-24 17:55:49 +01:00
10e5775bf4 Add initial comments setup 2019-01-21 01:04:58 +01:00
6ee5077c88 Add documentation 2019-01-20 22:47:15 +01:00
380732d28a Add test for login failure 2019-01-20 22:12:51 +01:00
5c847b94e6 Add full test for LoginForm 2019-01-20 21:39:32 +01:00
bdf0aa57be Add TestUtils and a generic way to isolate connected components 2019-01-20 18:11:18 +01:00
0fcd8cbb03 Move login logic into a single folder 2019-01-20 00:48:22 +01:00
4f17f8d6a9 Return response.data from axios 2019-01-20 00:48:13 +01:00
26f106fcae Create LoginForm 2019-01-19 19:21:56 +01:00
c1c7c829e7 Add support for error actions 2019-01-19 17:39:54 +01:00
c1d21350a8 Add PromiseMiddleware 2019-01-19 17:30:15 +01:00
eedd57c527 Add ability to easily create unions of action types 2019-01-19 15:23:51 +01:00
65d14df812 Export React and ReactDOM 2019-01-19 11:35:03 +01:00
8fd2eafdca Reorganize tsconfig.json files
According to:
https://github.com/RyanCavanaugh/learn-a
2019-01-18 23:00:36 +01:00
6d2907982f Add main and types to client 2019-01-18 20:57:08 +01:00
b8961a0308 Add Server and Client renderer 2019-01-18 20:56:41 +01:00
953b8f4abb Move react dependencies to packages/client 2019-01-18 20:42:09 +01:00
a46a2d28bf Mv client files into separate package 2019-01-18 20:31:16 +01:00