Answer the question
In order to leave comments, you need to log in
Reactjs - creating tabs, how to make a tab all?
I started studying reactjs , decided to try to apply it, found the tabs module, everything seems to work, but I would like to make a tab everything, on click so that everything is available
https://jsfiddle.net/x6arc0tc/
Answer the question
In order to leave comments, you need to log in
I didn't quite understand your problem. Add another tab and name it "all". Your problem is that you are inserting some code into your client application at runtime in php. So it should never be done. React - used as a renderer in SPA, but in PHP you have to write rest-api and already access it and load data. If you need initial data from PHP - do this:
<html>
<head>
<script>
window.__INITIAL_DATA__ = <?= printInitialData() ?>
</script>
</head>
<body>
<div class="reactRoot"></div>
<script src="bundle.js" />
</body>
</html>
constructor(props) {
super(props);
this.state = {
activeIndex : 0
};
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question