Environment: es6 hooks
I am fairly new to reactJS (3mths/500 hours) and struggling to find my way through the disparate collection of code samples and solutions in various corners of the opensource world, most of which appear to still be (even on your website) using the now-deprecated classes instead of hooks. As a programmer of some 40 years experience, on and off, I find the laissez-faire approach of the openSource world, when it comes to documentation, more than a little frustrating.
I find myself spending days to resolve straightforward issues, getting trapped in outdated methods or suggested solutions which just don't work. Searching for assistance rarely turns up anything from react.org and I dread the StackOverflow results which I have to wade through and which, more often than not, fail to provide a solution. This is not my idea of a professional working environment.
Even when solutions are provided, it would appear that they are generally not written by documentation experts and, quite often, critical pieces of information are left out. This is common in the StackOverflow environment, but not only... I find, also, that this lack of documentation expertise results in a failure to identify the audience and, therefore, can fail to address the needs of all users, from beginner to expert. An expert can skip the bits they already know, but a new user needs to see all of it, and see it in context: so often a solution is presented but you have no idea of the html it is working with...
On the other hand, and I would specifically mention the react.org site in this matter, the solutions are overly trivial and unhelpful in resolving issues in a complex application.
I have worked in many environments over the years, starting in 1977 on the IBM System 3. But I have never before worked in an unsupported environment like this one. On that subject, I note that npm have a support email address, but emails to that address go unanswered, except for the polite reply recording the receipt of an issue. The offer of support from npm is somewhat aspirational perhaps... I am still waiting for a solution to prevent my navbar scrolling off the screen after attempt to implement npm's solution.
I have been trying to resolve my current reactJS issue for the best part of a week. I only want to change the style of a DIV when it is clicked - you would not think it could be so hard, and i suspect it is actually simple enough provided you can find that corner of the opensource universe in which the solution is hiding...
But, after various strategies and proffered solutions, I remain unable to proceed with the development of my app. My navbar still scrolls off the screen and I cannot change the div style when it is clicked. I am miserable about my lack of progress!
In relation to the div-changing issue, I suspect part of the issue is that what happens underneath reactJS is invisible to the programmer (until you get huge error messages which mean nothing to the reactJS user). In fact, it is not always clear what a reactJS item actually is. For instance, I assumed (having done a lot of work in the object-oriented code world, that the CSS Properties item was an object, which would allow one style collection to copy another style collection:
tileStyle1 : CSS.Properties = { {/* clicked style */}
backgroundColor: 'blue',
fontFamily: 'londrinaBlackRegular',
color: 'yellow'};
but tileStyle = tyleStyle1 produces an enormous error message, all gobbledegook to me, though I get that you cannot copy a set of styles from one of these non-objects to another. A shame.
I also want to ask you why you publish all that guff in the error messages. Sure, if you are working on the compiler and want to see all the underlying javascript stuff when things go wrong, I can understand it might be useful. But what makes you think a reactJS developer wants to see all that, and how would it help them anyway?
In trying to resolve this div issue, I discovered t is also not possible to include a ternary operator in the DIV code -though one might assume it should. I tried several ways but all failed for one reason or another. The followimg suggestion from StackOverlow fails also - producing the error: "unexpected token" at the first of the === characters. Again, a shame, as it would have been a neat solution. Obviously he didn't test the code before he posted it. :-(
Support
You can find the original question with the code at https://stackoverflow.com/questions/62258489/reactjs-hooks-asx-changing-the-style-parameters-for-a-div-when-it-is-clicked/62258647#62258647
I would appreciate a solution to this issue, if there is one; an up-to-date, comprehensive, manual ought to be on your Todo list; and perhaps you could offer a more predictable avenue for obtaining support?
Best regards
Sunbeam Rapier
Sydney
Environment: es6 hooks
I am fairly new to reactJS (3mths/500 hours) and struggling to find my way through the disparate collection of code samples and solutions in various corners of the opensource world, most of which appear to still be (even on your website) using the now-deprecated classes instead of hooks. As a programmer of some 40 years experience, on and off, I find the laissez-faire approach of the openSource world, when it comes to documentation, more than a little frustrating.
I find myself spending days to resolve straightforward issues, getting trapped in outdated methods or suggested solutions which just don't work. Searching for assistance rarely turns up anything from react.org and I dread the StackOverflow results which I have to wade through and which, more often than not, fail to provide a solution. This is not my idea of a professional working environment.
Even when solutions are provided, it would appear that they are generally not written by documentation experts and, quite often, critical pieces of information are left out. This is common in the StackOverflow environment, but not only... I find, also, that this lack of documentation expertise results in a failure to identify the audience and, therefore, can fail to address the needs of all users, from beginner to expert. An expert can skip the bits they already know, but a new user needs to see all of it, and see it in context: so often a solution is presented but you have no idea of the html it is working with...
On the other hand, and I would specifically mention the react.org site in this matter, the solutions are overly trivial and unhelpful in resolving issues in a complex application.
I have worked in many environments over the years, starting in 1977 on the IBM System 3. But I have never before worked in an unsupported environment like this one. On that subject, I note that npm have a support email address, but emails to that address go unanswered, except for the polite reply recording the receipt of an issue. The offer of support from npm is somewhat aspirational perhaps... I am still waiting for a solution to prevent my navbar scrolling off the screen after attempt to implement npm's solution.
I have been trying to resolve my current reactJS issue for the best part of a week. I only want to change the style of a DIV when it is clicked - you would not think it could be so hard, and i suspect it is actually simple enough provided you can find that corner of the opensource universe in which the solution is hiding...
But, after various strategies and proffered solutions, I remain unable to proceed with the development of my app. My navbar still scrolls off the screen and I cannot change the div style when it is clicked. I am miserable about my lack of progress!
In relation to the div-changing issue, I suspect part of the issue is that what happens underneath reactJS is invisible to the programmer (until you get huge error messages which mean nothing to the reactJS user). In fact, it is not always clear what a reactJS item actually is. For instance, I assumed (having done a lot of work in the object-oriented code world, that the CSS Properties item was an object, which would allow one style collection to copy another style collection:
tileStyle1 : CSS.Properties = { {/* clicked style */}
backgroundColor: 'blue',
fontFamily: 'londrinaBlackRegular',
color: 'yellow'};
but tileStyle = tyleStyle1 produces an enormous error message, all gobbledegook to me, though I get that you cannot copy a set of styles from one of these non-objects to another. A shame.
I also want to ask you why you publish all that guff in the error messages. Sure, if you are working on the compiler and want to see all the underlying javascript stuff when things go wrong, I can understand it might be useful. But what makes you think a reactJS developer wants to see all that, and how would it help them anyway?
In trying to resolve this div issue, I discovered t is also not possible to include a ternary operator in the DIV code -though one might assume it should. I tried several ways but all failed for one reason or another. The followimg suggestion from StackOverlow fails also - producing the error: "unexpected token" at the first of the === characters. Again, a shame, as it would have been a neat solution. Obviously he didn't test the code before he posted it. :-(
You can find the original question with the code at https://stackoverflow.com/questions/62258489/reactjs-hooks-asx-changing-the-style-parameters-for-a-div-when-it-is-clicked/62258647#62258647
I would appreciate a solution to this issue, if there is one; an up-to-date, comprehensive, manual ought to be on your Todo list; and perhaps you could offer a more predictable avenue for obtaining support?
Best regards
Sunbeam Rapier
Sydney