cdunn6754 / rereddit_frontend Goto Github PK
View Code? Open in Web Editor NEWA React frontend for my reReddit project
A React frontend for my reReddit project
I have 'dangerouslySetInnerHtml' in the post and comment lists. I want to include that styling that is provided by the cool wysiwyg editor. This should be okay because any html typed by a user into the editor will be a part of a string and won't be rendered.
The issue is that the api can still be accessed outside of the frontend. There a consumer could submit a new comment or post with malicious html in the body. Not sure how to stop that.
Like on the real reddit site, rather than loading all of the posts for a subreddit at one time load pages of 20 or so and then attach a loader at the end of the list that when brought into the window triggers another fetch from the api of the next 20.
Related to cdunn6754/reReddit_backend#2 (comment)
Currently we store the two types of comments in disparate redux slices. I don't think that's necessary since we will never need both at the same time (caching may not be a bad idea down the road too). The idea would be to use the comments redux slice, that is currently only used for the trees of comments corresponding to the post detail view, to store the comments for the user profile view.
It's a little complicated because the post detail comments are nested by the backend and the user profile comments are just a list of comments that the user has made.
It may be best to use the nested comment serializer for both cases and specify the queryset, i.e. whether we want all comments related to a post or related to a user, with either separate views or POST/GET parameters.
Nesting the user profile comments would almost be nice because then the work of grouping them by post is done in the backend.
When you create a new comment and then reply to it before the list is reloaded the child will not
render properly. I think that we just need to be sure to add a children
property to the comments when they
are first created. In fact that might be something that should be taken care of on the backend for
consistency.
Currently there is just a "coming soon" banner there. Its a little trickier than it seems because we need to
alter the backend as well. We need to add the post details of each comment to the data. That way the comments can be grouped together into a single entry and links to the post detail page of their post can be added.
This is related to this backend issue
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.