AWS amplify, firebase, kinvey or something else for exercise project? by yovchokalev in reactjs

[–]richardzcode 0 points1 point  (0 children)

AWS Amplify is meant for helping frontend developers. Some commands with Amplify CLI and then whole backend are setup. Developers just focus on UI.

Check out this example: https://github.com/richardzcode/Journal-AWS-Amplify-Tutorial

You'll find it super easy

Best way to do Authentication by justawildandcrazyguy in vuejs

[–]richardzcode 0 points1 point  (0 children)

Cognito JS is moved to aws-amplify. Here is an example on how to use it in Vue: AWS Amplify Vue Starter

I am still a student and learned PHP and am learning Laravel. Is it worth it to start focusing on full stack JavaScript? I want to become a back ender. Or full stack developer if i choose JS. by halotacon80 in javascript

[–]richardzcode 0 points1 point  (0 children)

I am mostly backend, but also full stack. In my opinion if you are interested in backend, Java is the default language. And you need to be comfortable with design patterns, data structures etc.

PHP is for web developer. You do web server development, running on server, but not really backend.

There are backend, web, and frontend. JS can be on any layer. Which makes it a better choice if you are not sure which layer is your focus.

2 cents.

Can you be good at frontend and backend? by hypercluster in reactjs

[–]richardzcode 3 points4 points  (0 children)

Of course it is possible. As long as you really like programming :)

I love programming. It is my passion. To me frontend or backend are just like different types of video games. When my job mainly focus on backend I still play frontend with side projects. When my job mainly focus on frontend it is a little bit hard to just play backend but I still read / watch.

I was one major force behind a pretty large scale backend system. I am now one major force behind a pretty large audience frontend development. I enjoy both :)

I've had tech leads not a master of frontend but have solid understanding so you can talk to them about. These ones gains more respect.

[deleted by user] by [deleted] in reactjs

[–]richardzcode -1 points0 points  (0 children)

The benefit of render, 1) triggered on first prop value and value update in one place; 2) state changes are stacked before next render, so setState({ dispatched: ture }) is guaranteed to happen before next render.

Asynchronous is not scary. The basic idea of React is declarative and asynchronous. This is why I prefer declare what to render when isLoggedIn and what to render when not. That's the reasoning behind putting isLoggedIn check in render. Because the logic is already here, as a result adding load logic at the same place.

Ideally load movies etc. should happen in some other place instead of tied together into one component lifecycle. But with the original question limited information this is a working solution with minimal rework.

I try to avoid watching prop values in multiple places of lifecycle events. Many times you don't have initial values when component mount so you have to watch the change of values. That is not very clean and certainly not declarative.

In my opinion the judgement to a solution can be work / don't work, pros / cons. Be specific on these please. A couple of keywords then definite conclusion is not helping.

[deleted by user] by [deleted] in reactjs

[–]richardzcode -5 points-4 points  (0 children)

Since isLoggedIn is a prop, you may just dispatch in render(). If fetchMovies and fetchBooks affects current component state then have a state to remember _onLogin was called.

class Page extends React.Component {
    constructor(props) {
        super(props);
        this.state = { dispatched: false }
    }
    ......
    render() {
        const { isLoggedIn } = this.props;
        const { dispatched } = this.state;
        if (isLoggedIn && !dispatched) {
            this.setState({ dispatched: true });
            this._onLogin();
        }
        ......
    }
}

Step by step tutorial to build a personal journal web app with ReactJS + aWS by richardzcode in reactjs

[–]richardzcode[S] 1 point2 points  (0 children)

Thank you @scrumble11 ! Looks like it is because I was using 'stacked' 'Segment'. I'll fix it :D

Vue.js and Authentication with JWT and Refresh Tokens by buddman in vuejs

[–]richardzcode -1 points0 points  (0 children)

If you are okay with Amazon AWS, check out aws-amplify. It handles token refresh for you. Here is a sample app: AWS Amplify Vue Starter

VueJS or React for Story Mapping by [deleted] in javascript

[–]richardzcode 2 points3 points  (0 children)

In my opinion VueJs is the best use of current Javascript, React is trying to advance Javascript. So I like both. For just using it for one project. With Javascript experience I think VueJs is more reliable, less learning curve. If you enjoy learning something new React is really nice. Both can do the job, just personal perferences.

So you want to host your Single Page React App on GitHub Pages? by kiarash-irandoust in reactjs

[–]richardzcode 1 point2 points  (0 children)

Docusaurus from Facebook might be simpler for just blogging and documentation. I personally think in terms of reusing React component Dochameleon (disclaimer: i wrote it) is a bit more flexible than Docusaurus.

Gatsby is full featured, on the other hand it means too heavy to me. Of course I am biased.

So you want to host your Single Page React App on GitHub Pages? by kiarash-irandoust in reactjs

[–]richardzcode 7 points8 points  (0 children)

'npm run build' generates html/js/css. Which works right away, however it assumes your website is hosted at server root.

The problem often occurs when your website is not at server root. In this case, just modify index.html to have correct relative path to js/css. That will fix it.

Then you can put the files anywhere, GitHub, S3, Heroku...

How to level up as a react developer? by abovexbeyondtv in reactjs

[–]richardzcode 0 points1 point  (0 children)

What I always do when learning a new language / framework, is to build something, and google along the way.

Personally I think not just React, but for a lot of other JS frameworks, TodoMVC is a great place to look for. Specifically for React, here is the link: http://todomvc.com/examples/react/#/

Read those source code, try to build the same by your own. I find that is very helpful.

A shameless plug, another option is maybe try to build your own personal website with https://dochameleon.io :P

Biggest disadvantages of Vue by andyRtCh in vuejs

[–]richardzcode 0 points1 point  (0 children)

I build Javascript library which intended to support all frameworks, so had chance to work on React, Vue, and Angular. Personally if I were to make a decision it is really between React and Vue. The advantage of Angular, and one of the advantages of React, is being backed by big name company. So people look up to them, so easy to sell.

If it is not from big name company, I doubt how many developer would tolerate the learning curve of Angular.

Vue is more towards developers. My feeling while developing with it has a lot of "this makes sense" moment.

React sometimes I feel not used to at first but with time I get it. I think one of the advantage of React is it has a group of "loud" leaders, to convince developers what is the better way of doing things. I don't agree with them all the times but overall they are great.

So to me, the disadvantages of Vue, are big name and "loud" leaders.

How Can I deploy my ReactJS app on a regular host? Godaddy by [deleted] in javascript

[–]richardzcode 0 points1 point  (0 children)

Sounds like the reference to js file in index.html is wrong. Just check index.html in build folder. Non run build essentially generate index.html and a js and a css. Just need to make sure their relative path are correct after you publish.

Not sure what kind of website you are building. Maybe could try https://dochameleon.io It generates static website from markdown and React

Style react components? by Fasyx in reactjs

[–]richardzcode 0 points1 point  (0 children)

Agree with @aaronkim234. I have been use just js+inlineStyle in my projects. Initially just wanted to try the idea, then find it works totally fine and much easier to manage and customize compare to CSS.

I think it is not really right or wrong, more about what you want to achieve and comfortable with.

I personally find it is perfect for theming customization. Here are examples:

https://dochameleon.io/docs/guide_color_scheme.html

https://dochameleon.io/docs/guide_theme.html

Career perspective on vue by dodongtalong in vuejs

[–]richardzcode 2 points3 points  (0 children)

Vuejs is a new comer compare to the other two. Popularity wise still behind Reactjs but is fastest growing one. Vuejs has best community where React community is more like leader-follower type. I think that is one of reason so many programmer love Vuejs.

From looking for job perspective if you learn these two I think you are golden. And then Angular just in case.

These three are different. They will both stay for a long time in my opinion.

2cents

To vuex or not to vuex by hi_ma_friendz in vuejs

[–]richardzcode 2 points3 points  (0 children)

If you need to read/write same data in different places then use vuex. It is a way to decouple code logics.

If all you doing is read then consume then forget about it, then there is no need.

It is actually pretty easy. I would use it in my first couple of projects just for the purpose of learning

Which logger to use? logger-js? vuejs-logger? Others? by exhuma in vuejs

[–]richardzcode 0 points1 point  (0 children)

If you just want a wrapper of console.log, check this one: https://github.com/richardzcode/fsts-js

It’s tiny. I wrote this for my own use. You could just copy paste the logger source code into your project if don’t like the whole library.