New ask Hacker News story: Ask HN: Creating a web UI/UX with React.js
Ask HN: Creating a web UI/UX with React.js
3 by backslash_16 | 3 comments on Hacker News.
A few days ago I started rebuilding my side project's web UI in React.js, mostly because I want to learn one of the new front-end libraries/frameworks, and because it will be good to remove the server side rendering and communicate between the frontend and backend using only an API. Building components in React, using JSX is pretty straightforward. I can see a lot of potential value in separating my UI into many small components which I then compose. What I'm lost at is three things. 1) How should I handle what I know as nested templates, or nested layouts? In case that isn't super clear I mean the homepage styling and header/footer, the user page styling and menu bar, and other concerns like that. 2) I've been using seed data to create my components so far, is using them with my API as simple as getting and posting what I need and passing it to the components?\ 3) Navigation - I'm used to making a request to the server and having it return the correct view with all of the templates composed together in all their glory (boring I know :D). With react is there an official way of doing navigation? I've found some react-router libraries but none of them are officially from Facebook or the React.js team so I'm not sure if they are good, or if I am missing an official one. Any advice or answers for these questions is appreciated!
3 by backslash_16 | 3 comments on Hacker News.
A few days ago I started rebuilding my side project's web UI in React.js, mostly because I want to learn one of the new front-end libraries/frameworks, and because it will be good to remove the server side rendering and communicate between the frontend and backend using only an API. Building components in React, using JSX is pretty straightforward. I can see a lot of potential value in separating my UI into many small components which I then compose. What I'm lost at is three things. 1) How should I handle what I know as nested templates, or nested layouts? In case that isn't super clear I mean the homepage styling and header/footer, the user page styling and menu bar, and other concerns like that. 2) I've been using seed data to create my components so far, is using them with my API as simple as getting and posting what I need and passing it to the components?\ 3) Navigation - I'm used to making a request to the server and having it return the correct view with all of the templates composed together in all their glory (boring I know :D). With react is there an official way of doing navigation? I've found some react-router libraries but none of them are officially from Facebook or the React.js team so I'm not sure if they are good, or if I am missing an official one. Any advice or answers for these questions is appreciated!
Comments
Post a Comment