In my Main.js I create a first global state with a username and a list of users I’m following. Then, both the Wall component and FollowingSidebar render the list of follows and their messages (plus the messages of the main user). So far so good. But in a nested component inside FollowingSidebar called F…
Tag: javascript
Value from response is undefined ReactJs
I’m trying to get values from trains such as id and number, but when I try to do that, no values shows. When I try to console.log that I get response of undefined. It works well with station.name and station.city but i does not work with station.trains.is. Here is my code: And here is the response I get…
React Hook “useState” is called in function
I have button click system and it works. Now I want to fetch the API inside the function. So, change the function clickCreate like this However there comes error like this. I should not use useState and useEffect in function, but how can trigger the API by btn click?? Answer You should move the hook to compon…
Open Another Input Text when the user selects an option
I am a newbie and I have this project where the user should have the option of custom input if the listed options are not in dropdown. HTML PHP I would like if the user selects the custom option then a input text should appear on the screen. Answer
SyntaxError: Expected corresponding JSX closing tag for . Line (17:9)
As I am working on React.js since last week. The closing tags are already provided by me of anchor <a> tag in below snippet. As I am working on this, I haven’t found this type of error. I already check all the opening and closing of tags. Please find the error and give me the best possible solutio…
Google sheets automatic Notes [with onEdit() function] on cells’ values resulting from formulas
Is it possible to create automatic Notes based on cells variable values resulting from formulas ? For example A1=stxt(B1;1;4) gives “some” with B1=sometext (variable value), so that A1’s Note would be “some” And a second question : how to add at least a third condition for except…
Vuetify Data Table Expand Row on Column Click
I have a vuetify data table that includes expandable rows. The only real difference I have from the demo is that I would like the item.name column to open/close the expandable row just like the chevron icon. When I put an @click handler on the v-slot for that column I get the error Error in v-on handler: R…
Highcharts pass external variable to global options
First time working with highcharts-vue. I have the following global chart options, which I import in my app.js. It is here I have added a button to the exporting menu to allow for download CSV / XLSX functionality, leveraging maatwebsite/laravel-excel, as the final export will include additional columns to sh…
Why won’t my simple get request with axios return what the controller’s returning?
I’m learning Laravel with React.js but I can’t figure out why my simple get request won’t work. I get a 404 error. I’ve seen a similar question asked on SO and I’ve tried running composer require barryvdh/laravel-cors on the command line but it still doesn’t work. How can I…
React Context Provider all children re rendering
can someone explain to me why the next code re renders all children components from the provider console everytime button is clicked, all components re rendering but if context provider is wrapped in a component as follows console when button is clicked only the component consuming the context (and the compon…