reactjs – Loads a specific scene by clicking the button

Below is the current code under App.js

import React, { Component } from "react";
import { BrowserRouter as Router, Switch, Route, Link } from "react-router-dom";

import Home from "./components/Home";
import Office from "./components/Office";
import Gym from "./components/Gym";

//export default App;
export default class App extends Component {
  // constructor(props) {
  //   super(props);
  //}
  render() {
    return (
      
        

Welcome to React Router Tutorial


); } }

I want to load a certain scene when I click on gym

This is what I tried, I wrote the Scenechange function in App.js and use an onClick function to bind it. But that does not change anything

 
  • Gym
  • Every advice is appreciated

    sharepoint online – button to block the upload on a modern site

    I do not have access to SPFX or any developer tasks, otherwise it would be a breeze. Has anyone successfully blocked the upload button and the new button (not even seen) and allowed a user to edit, rename, and delete the document? It would be a miracle if someone had done this successfully. I have SharePoint permissions and can not seem to rename myself without the Add Document permission. And the permissions to add documents allow the use of the upload … any ideas, whatever?

    Disable the Steam Controller or the Home button of another controller and other non-gaming games for Steam games

    I do not know if this is the place to ask, if not lead me there, but

    I am looking for a method (system editing, script, program, option) to disable the guide key and all shortcuts that Valve's platform Steam intercepts, and to perform non-game related tasks.

    like all media buttons.

    I do not know what the controller combo's are, but you can trigger absolutely 100% of the media keys with just one controller. I've seen them all, Mail, Web, Stop, Play, Pause, Back, Forward …

    Combinations also open a big picture (but not in a working condition)

    Combinations also open the steam keyboard.

    The list of non-gaming inputs goes on and on and on.

    Obviously in the middle of a game absolutely none of these is interesting to me.

    Only if I let my character / my car go up and down do you know that will be good for me.

    Also out of the game.

    Because I do not use my controller when I'm not playing, I use a mouse and a keyboard. It drives me crazy that I need to explain that, but the idea that I want to use my controller for desktop tasks is wrong and should not be accepted. Which is what valve has.

    I would like to find a way to prevent this.

    Disabling "guide button focused steam" in the settings of the Big Picture Controller does not work. it just prevents this action specifically and not all the rest. And to make matters worse, this option will come on again from time to time.

    I do not know what the best solution would be because these inputs are unlikely to be combined into anything significant on any step of the way before they reach Steam's ears. You're probably just a single press of a button, and it's just steam that turns it into garbage.

    That's why I am afraid that this is something that requires modifying the Steam app itself.

    Any ideas for a simple solution?

    User expectation – Click the "Add to cart" button. What's next?

    When I read about the e-commerce add-to-cart flow on the web and here for Stack Overflow, I found that this is a very common question, but it's difficult to make a decision, because we do not have any Compare alternatives and do not specify why we should opt for any strategy.

    My question is:

    In which situation should I choose each of the alternative bellows?

    After clicking on "Add to cart" Button:

    1. Stay on the current pagePerform an animation on the "Add to cart" button to indicate that the item has been added and display a bubble message in the mini cart in the header.

    Enter image description here

    2. Stay on the current pageScroll through the screen to be frequently bought together and display a message that the product has been added to the cart.

    Enter image description here

    3. Open a modal with continue to buy and checkout and frequently purchased items.

    Enter image description here

    4. Go to an intermediary site like Amazon do.

    Enter image description here

    5. Forward to the shopping cart and guarantee that there is another buy button.

    Ps: I already read. Do we need to view the shopping cart page after the user has clicked on the list page "Add to Cart"? and What's the Best Ecommerce Add-to-Cart Flow??

    I know that everyone has a good reason and an interesting conversion and would be great if they can List pros and cons for everyone to argue about your proposed use.

    excel – Resets the number of buttons so that they start again at button 1 after all buttons have been cleared

    I have inserted the following three buttons in my Excel spreadsheet:

    Enter image description here

    I use a German Excel version: Button = Button

    As you can see buttons are counted by 1,2,3 and each other button gets the next higher count number.

    Now I'm running the following VBA to delete everything buttons:

    Sub Delete_Buttons()
    Sheet1.Select
    Sheet1.Buttons.Delete
    End Sub
    

    After I started this VBA, I insert the one buttons once again:

    Enter image description here

    As you can see buttons are counted down 3,

    How can I reset the number of buttons and start counting? 1 once again?

    Onclick () event to change the text of a button (play / pause)

    I have this div in my html and wanted to get the click on the play button to change the text to pause and click again, change to play.

    var buttonControl = document.querySelector('#control');
    var playNameControl = document.createTextNode('play');
    var pauseNameControl = document.createTextNode('pause');
    
    buttonControl.onclick = function control(){
        if(buttonControl.value = 'play'){
            buttonControl.innerHTML = '';
            buttonControl.appendChild(pauseNameControl);
            buttonControl.setAttribute('value','pause');
        }
        else{
            buttonControl.innerHTML = '';
            buttonControl.appendChild(playNameControl);
            buttonControl.setAttribute('value','play');
        }
    }
       < div class="botoes">
            < button id="control">play
        < /div>

    It works only on the first click. Since it starts to play when clicked, it changes to pause, but clicking again does not make any changes.

    forms – The button appears in two important places and feels superfluous

    I'm creating a login page, but have a problem with my navigation bar. As you can see, the sign in button appears in two places,

    How can you best tackle this? For me, it's strange that it's shown twice, but it's a necessary part of the navigation bar.

    I can fix that by just removing the button for this page … but then it feels like a complicated solution because the template code needs to be changed with an if statement.

    What is to be done instead?

    Enter image description here