@rafaelrozon
Developer
Nothing here yet.
Nothing here yet.
If you're extending some class you need to make sure the parent class is properly initialized before your class. This is OOP, not just React/JS. A few things to keep in mind: if you don't need to do anything in the constructor of your component, you can omit it and a default one will be used. You don't need to do anything. if you do anything in the constructor of your component, then the first thing inside your constructor should be the call to super(props)
Thank you Xingheng Wang for your answer. What I'm looking for is more about managing users permission through a rest api, because I don't want to build it myself. Ideally, I'd like some endpoints that would allow me to create a permission group, add permissions to the group, create a user group, associate user groups with permission groups, and then users to user groups. Nothing crazy complicated. Then, having that information, I could use JWT to pass it around.
So, I quick update on this. My colleagues suggested these libraries: Manage Role-Based Access Control with the REST API Athenz Apache Fortress I think Athenz is particularly interesting. But it may be a bit overkill for a little application. And I haven't found any company or online service that provides this functionality, unfortunately.
Your IIFE is returning another function, which is not being called. If you want to print 1,2,3, do this: var arr = []; for ( var i = 0 ; i < 3 ; i++) { arr.push( ( function ( j ) { return function ( ) { console .log(j); } }(i)()) ) } You're getting 3 because the method push adds the element to the end of the array and returns the new length for the array. Some reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push. If your IIFE doesn't return another function, then you don't need the double parenthesis at the end.
I said no considering small companies that cannot afford many developers working to maintain a totally customized UI library. BUT I think even small companies should create its own UI library by wrapping other UI libraries/frameworks translating whatever the third party library provides to what it's useful to the company. And if in the future they want to change the UI library used, they don't need to change a lot of code, only the wrappers.
In general, if I have a stack trace, I first try to evaluate if the stack trace makes sense. Sometimes is the symptom of another problem somewhere near the error that is being reported. Then, I try to solve the first problem reported, and then the second, etc. I think it's different when you have a problem with servers. There're other things involved like network, software versions, etc. From my experience, it's important to not tackle all the problems and possible causes at once. But isolate a problem, see what could be causing it, check documentation. You'll probably start to have some ideas about why the problem is happening. Try these ideas, see if they make sense. If they don't, isolate even more the problem. It's basically divide and conquer. And use logs, logs are you friend. If you provide more details or examples, I can try to give you more suggestions.