Skip to content

Releases: siddharthkp/bae

Rebrand to bae!

20 Sep 10:41
Compare
Choose a tag to compare

reaqt has been renamed to bae for easier verbal conversations about it 😅

Reduced time to first byte by streaming

04 Apr 12:43
Compare
Choose a tag to compare
  • Uses rapscallion under the hood
  • Render some content on the screen fast - don't keep your users waiting

Benchmarks:

ttfb (ms) total (ms)
without streaming 151 151
with streaming 22 110

fetch data asynchronously on the server

17 Mar 09:55
Compare
Choose a tag to compare



react made easy

 
 

asyncComponentWillMount

React has a lifecycle method that get's called on the server componentWillMount that can be used to set data for server rendering. But, it does not support asynchronous data fetching before rendering the component.

reaqt introduces a new lifecycle method to pages that runs only on the server.

import React from 'react'

export default class extends React.Component {
  constructor (props) {
    super(props)
    this.state = {username: 'siddharthkp'}
  }
  asyncComponentWillMount () {
    /* 
      Return a promise.
      It will get resolved on the server and passed as props to the component.
    */
    return axios.get(`https://api.github.com/users/${this.state.username}`)
  }
  render () {
    return <div>{this.props.bio}</div>
  }
}

v1.0.0

13 Mar 17:19
Compare
Choose a tag to compare



react made easy

 
 

  • Quick start ⚡️
  • Minimal tooling 🔧
  • Server rendered + out of the box optimisations 🚀
  • Dev mode with hot module replacement 📦