K
K
Kaloo2021-03-05 17:20:21
Notes
Kaloo, 2021-03-05 17:20:21

Not creating a note in Onenote?

60423e0f07abe502477531.png

For now, I have been clicking on create a note, but it is not being created
. What should I do?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0xD34F, 2017-12-13
@Cetch

Transfer active from NavLinkto Nav(by the way, what will remain there after that? - yes, nothing but rendering a, to which props are passed without changes; it turns out that this component is not really needed, it’s easier to create this one aright away in Nav), and store the index in it active element:

state = {
  active: null,
  ...
}

setActive(active) {
  this.setState({ active });
}

{this.state.items.map((n, i) => (
  <li>
    <NavLink
      href="#"
      className={this.state.active === i ? 'active' : ''}
      onClick={() => this.setActive(i)}
    >
      {n}
    </NavLink>
  </li>
))}

O
oh, 2017-12-13
well @AnneSmith

then you need to start with CSS and Javascript
your problem has nothing to do with react, you can even remove the tag
with the previous ones no one bothers, set the main color to all elements, and then change to the active one for the current one

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question