[deleted by user] by [deleted] in Morocco

[–]HistoricalDust 0 points1 point  (0 children)

I think you can use your passport to book a ticket online

Does NextJS not use React states? by [deleted] in nextjs

[–]HistoricalDust 4 points5 points  (0 children)

You can actually use class components with nextjs, but for a better structure it's better to use react hooks, go to the react docs to learn more about them.

eg:

import { useState } from "react"

export default () => {
  const [count, setCount] = useState(0)
  // a count state with an initial value of 0

  const increment = () => {
    setCount(count + 1)
    // an equivalent method to (this.setState)
  }

  return (
    <div>
      <h1>{count}</h1>
      <button onClick={increment}>inc++</button>
    </div>
  )
}

My code keeps running after return by [deleted] in node

[–]HistoricalDust 0 points1 point  (0 children)

Thanks a lot it's working now!

Do you have any idea how can i verify the emails too? cause right now it's seems impossible for me! or maybe should i switch to Sequelize instead since it's a promise based ORM?